From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Floyd Davidson Newsgroups: gmane.emacs.help Subject: Re: Newbie: Interactive goto-line ?! Date: Wed, 25 Feb 2004 08:35:27 -0900 Organization: __________ Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <87ishvnjts.fld@barrow.com> References: <403b2dbe$0$38285$e4fe514c@dreader14.news.xs4all.nl> <874qtgqq9w.fld@barrow.com> <403BBB98.5030506@yahoo.com> <877jycoxo4.fld@barrow.com> <403CD1AE.3070403@yahoo.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1077731368 14917 80.91.224.253 (25 Feb 2004 17:49:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 25 Feb 2004 17:49:28 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Feb 25 18:49:04 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Aw39b-0006mb-00 for ; Wed, 25 Feb 2004 18:49:03 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1Aw36o-0001nH-JH for geh-help-gnu-emacs@m.gmane.org; Wed, 25 Feb 2004 12:46:10 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!headwall.stanford.edu!HSNX.atgi.net!falcon.america.net!eagle.america.net.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: gnus 5.10.6/XEmacs 21.4.15/Linux 2.6.0 Cancel-Lock: sha1:nbKh5SMG4bGXD+o1BvAKG/wY++g= Original-Lines: 89 Original-NNTP-Posting-Host: 209.124.156.115 Original-X-Trace: eagle.america.net 1077730576 209.124.156.115 (Wed, 25 Feb 2004 12:36:16 EST) Original-NNTP-Posting-Date: Wed, 25 Feb 2004 12:36:16 EST Original-Xref: shelby.stanford.edu gnu.emacs.help:121257 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:17210 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:17210 Kevin Rodgers wrote: >Floyd Davidson wrote: > > Kevin Rodgers wrote: > >>Floyd Davidson wrote: > >>>I'm not sure what the default bindings are, but I've always used > >>>any emacs with M-g bound to the goto-line function. That means > >>>going to line 214 is as easy as the key sequence 'ESC 214 ESG g' > >>>This is what is in my .emacs file: > >>> (define-key esc-map "g" 'goto-line) > >>> > >>By default M-g is a prefix key, bound to facemenu-keymap. I prefer: > >> > >>(global-set-key "\C-cg" 'goto-line) > >>(global-set-key "\C-cG" 'goto-char) > > > > Wellll... that is an abomination that shouldn't be allowed > > to survive! (Okay, the fact that I've been using M-g bound > > to goto-line for 20 years has something to do with my opinion, > > but...) > >M-g is reserved for Emacs to bind. The `C-c LETTER' keys are reserved >for the user to bind. I believe you have misunderstood what that means though. We are, I believe, talking about configuration changes in a user's ~/.emacs file, not package development for addition to the .../emacs/lisp/ directory. Consider where I have in the past been forced to regularly use 3 or 4 different emacsen (today I am retired, and happily down to just XEmacs for regular use, and GNU Emacs on occasion). I've made an effort to have one set of key bindings that for *all* of the emacsen that I use. Over the years some of them have changed, while others have become embedded in concrete that has hardened with time... In short, key bindings are *all* a personal choice, and Emacs does not reserve *any* of them. The fact that GNU people have decided to bind something particular to a key has virtually no significance to me at all, as far as whether I'm likely to change it or not. I learned emacs on a variation of Mince, and still use some of the Mince concepts. Your C-a key no doubt only goes to the beginning of a line, and from there does nothing. Mine will go to the beginning of a line, and then it will go up to the previous line. C-e has the same effect by going to the next line. It takes coding up a macro or lisp function for various emacsen such as GNU Emacs, XEmacs, Microemacs and others, but it makes editing much faster! If a command is used with a fair amount of regularity, I want it bound to a key sequence. The frequency of its use is a major factor in selecting the key sequence. > > How often do you ever use the facemenu-keymap command, compared > > to the goto-line command? In my case, I regularly use > > goto-line, and simply *never* use the facemenu-keymap command. > > (I don't use that functionality at all, even by menu or > > otherwise, as I basically never change any of the faces on the > > fly.) > >I seldom use goto-line, and never use the facemenu-* commands. Hence, why waste key bindings with facemenu commands. > > Hence a nice short key sequence like M-g should be assigned to > > a commonly used command, and an often used command like goto-line > > is a good example > >Whether goto-line is often used, whether it should be often used, and >whether M-g is a good binding for it are all arguable points. Those who are saying it should never be used are not thinking about what they are saying. Of course, you have ignored the context of my statement above... which clearly applies only to *my* often using that command. That is not arguable. > > (which I can't imagine binding to a three key > > sequence). > >`C-c g' is a 2-character key sequence. Which is insignificant. But the fact that *three* keys must be pressed to invoke it is, which is why I mentioned it. -- Floyd L. Davidson Ukpeagvik (Barrow, Alaska) floyd@barrow.com