help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie: Interactive goto-line ?!


From: Floyd Davidson
Subject: Re: Newbie: Interactive goto-line ?!
Date: Wed, 25 Feb 2004 08:35:27 -0900
User-agent: gnus 5.10.6/XEmacs 21.4.15/Linux 2.6.0

Kevin Rodgers <ihs_4664@yahoo.com> wrote:
>Floyd Davidson wrote:
> > Kevin Rodgers <ihs_4664@yahoo.com> 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           <http://web.newsguy.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska)                         floyd@barrow.com


reply via email to

[Prev in Thread] Current Thread [Next in Thread]