Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!bbn!bbn.com!mesard From: mesard@bbn.com (Wayne Mesard) Newsgroups: comp.emacs Subject: [FB]inding new and useful GNU commands (was Re: Line numbers) Message-ID: <39168@bbn.COM> Date: 27 Apr 89 13:04:41 GMT References: <39135@bbn.COM> <2201@pur-phy> Sender: news@bbn.COM Reply-To: mesard@BBN.COM (Wayne Mesard) Organization: Bolt Beranek and Newman Inc., Cambridge MA Lines: 31 In article <2201@pur-phy> sho@newton.physics.purdue.edu.UUCP (Sho Kuwamoto) writes: >I usually just [...] use >M-x < C-u # C-n. Pretty gross, but it seems to work. GNU Emacs has an interactive function called "goto-line". [Which one would discover by using the command-apropos command: Type "Ctrl-H a". NeXT, enter a word likely to be in the name of the command. In this case, "line" would probably be the one we'd guess. Emacs will churn away for away and then bring up a window with a list of all the commands containing the specified word in their name. If you don't find one that does what you want, try again with a different word, it's probably there. (If it occurred to you that such a command would be useful, then it may well have occurred to Emacs' creators as well.)] [You can test the command out by typing "Esc-X {command-name}" or get more documentation on it by typing "Ctrl-H d {command-name}".] Permanently bind the command to a key by putting something like the following in your .emacs file (in your home directory): (global-set-key "\C-xg" 'goto-line) This binds it to "Ctrl-x g". To bind it to, for example, "Esc g" substitute "\eg" above. This will take effect the next time you fire up Emacs. -- unsigned *Wayne_Mesard(); MESARD@BBN.COM BBN, Cambridge, MA