emacs-devel
[Top][All Lists]
Advanced

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

Re: Key binding M-g should really be goto-line


From: Juri Linkov
Subject: Re: Key binding M-g should really be goto-line
Date: Wed, 09 Mar 2005 09:05:33 +0200
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/22.0.50 (gnu/linux)

I see `goto-line' finally bound to M-g in CVS.  Good news!
After such a big change, it is time now for a few improvements.

1. Before this change, font-lock-fontify-block was bound to `M-g M-g'.
Now it is bound to `M-o M-g'.  I suspect that the reason to bind it
to `M-g M-g' was to make it easier to run this frequent command
by typing the same key twice.  If this is true then now perhaps it
should be rebound to `M-o M-o'.

2. goto-line is not too frequent command to deserve the sole
M-g key.  There are many other goto-related commands that could
share the same mnemonics and have the common M-g prefix key.
Since goto-line is still the most frequent among them, it could
have also the most easily typed key binding `M-g M-g'.

Other commands that deserve a key binding with a `M-g' prefix are:

2.1. next-error (alias goto-next-locus), previous-error

The current key binding C-x ` is too hard to type on
many keyboards, and it is the constant cause of complaints.
The prefix key M-g will allow to add natural key bindings
for these commands and to reduce complaints in future.

2.2. dired-goto-file

This command is used to move point to the specified file name in
dired buffers.  It would be useful to run this command not only
in dired buffers, but in any buffer, with a new key binding.

2.3. goto-char is much less used command than goto-line,
but sometimes it's needed and could have a key binding too.

2.4. The M-g prefix key will also reserve a space for adding
other goto-related commands later.  Similarly to facemenu-keymap
which currently displays the message after typing M-o:

Set face: default, bold, italic, l = bold-italic, underline, Other...

M-g could display a message:

Go to: line, M-g = line, char, file, next error, prev error, Other...

and have a keymap with the following key bindings:

M-g M-g   - goto-line
M-g l     - goto-line
M-g c     - goto-char
M-g f     - dired-goto-file
M-g n     - next-error (goto-next-locus)
M-g M-n   - next-error (goto-next-locus)
M-g p     - previous-error
M-g M-p   - previous-error

-- 
Juri Linkov
http://www.jurta.org/emacs/





reply via email to

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