Sen Speaks

Emacs: goto

Posted by senthilkumaran on August 2, 2007

How to go to a specified line in Emacs. Though i had this doubt for a very long time i never searched for it. Today got the answer when i was searching for some GDB stuffs. Anyway here it is. Add the following two lines in .emacs and restart emacs.

(global-unset-key [?\M-1])
(global-set-key [?\M-l] ‘goto-line)

Now pressing Alt+1 or Esc+1 will prompt for the line to jump. Don’t know whether there is anyother way but this is the first way i found.

3 Responses to “Emacs: goto”

  1. xurizaemon said

    M+g (or M+g,g on Aquamacs) is the default keybinding for this, I think.

  2. Yeah, even those two lines are not necessary i think. Emacs has default key binding for this, but i found that to be M+l.

  3. David said

    On the xemacs I’m using (OpenSUSE 11.1), it’s M-?. I found that by typing M-x goto-line.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>