Trying to get emacs to buttonize paths like so
/nfs/path/to/file /nfs/path/to/file_with_line_number:40
but not paths with a trailing colon /nfs/path/to/file:
This doesn't work
(defun buttonize-buffer-nfs-with-line ()
"Turn all file paths with line numbers into buttons."
(interactive)
(save-excursion
(goto-char (point-min))
(while (re-search-forward "\(/nfs[^ \>\<\(\)\t\n,\'\";:]+?\)\|\(/nfs[^ \>\<\(\)\t\n,\'\";]+:[0-9]+?\)" nil t)
(make-button (match-beginning 0) (match-end 0) :type 'find-file-button))))
(add-hook 'find-file-hook 'buttonize-buffer-nfs-with-line)