🕷 zenspider.com

by ryan davis

Looking for the Ruby Quickref?

emacs is über

Published 2007-09-25 @ 13:20

Tagged emacs

My current favorite emacs hack, thanks to SeanO. This extends find-file-at-point (which I have bound to C-x C-p) to automatically look a bit further for a line number and use it if available:

  (defadvice find-file-at-point (around goto-line compile activate)
    (let ((line (and (looking-at ".*:\\([0-9]+\\)")
                     (string-to-number (match-string 1)))))
      (and line (goto-line line))))