Xref: utzoo comp.editors:1135 comp.emacs:7310 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!shadooby!samsung!uakari.primate.wisc.edu!xanth!talos!kjones From: kjones@talos.uucp (Kyle Jones) Newsgroups: comp.editors,comp.emacs Subject: Re: Emacs Message-ID: <1989Nov27.181822.1237@talos.uucp> Date: 27 Nov 89 18:18:22 GMT References: <3397@jhunix.HCF.JHU.EDU> Reply-To: kjones@talos.uu.net Lines: 61 [ comp.emacs readers, the article to which I am responding was posted to comp.editors. ] Daniel Q Naiman writes: > I am new to gnu emacs and I am wondering how the experts deal with certain > problems in emacs. For example, > > 1. It seems like a pain to type ESC-X goto-line to move the cursor to > another line. Is it advisable to create one`s own key sequence to do > this, or is there some trick I do not know about for getting the > cursor. Create your own key sequence. C-x g and ESC g are good choices, since the commands that to which these keys are normally bound (inser-register and fill-region respectively) are not commands a beginner would normally use. In particular fill-region is a terrible command to invoke by accident. If you like ESC g, then put (global-set-key "\eg" 'goto-line) in your .emacs file. For C-x g, use (global-set-key "\C-xg" 'goto-line) > The command ESC-X < followed by ESC-number of lines CTRL-n > would work, but that's a lot of typing! Ironically enough, the command goto-line does little more than that, internally. > 2. In the manual to this wonderful PD Software it is indicated that > global search and replace commands are not needed as often in > emacs as they are in other editors. Why is this? If you become proficient with Emacs regular expressions, then you'll be able to do with one global replace command what it would take several commands to do in a lesser editor. That's true enough, although the author of the manual could have chose better words, if that's what he intended to say. > Am I missing some fundamental principle? Again, is it possible > to replace the command ESC-X replace-string ... with a command > with less keystrokes? Yes, just bind the command replace-string to a key. ESC r is a good choice for this, as move-to-window-line (what ESC r is bound to by default) isn't used that often, at least not by me. In fact I've never used it, except to see what it does. > Any hints or references to hints would be greatly appreciated. Read comp.emacs; 99% of the Emacs discussions take place there. As for why comp.emacs isn't called comp.editors.emacs, well, we're working on that. kyle jones ...!uunet!talos!kjones "Give your analytical hemisphere a break now and then... it's both a candy *and* a breath mint!" --- Cam Spillman Brought to you by Super Global Mega Corp .com