unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: Key binding M-g should really be goto-line
@ 2005-03-09  7:05 Juri Linkov
  2005-03-09  7:53 ` Miles Bader
                   ` (4 more replies)
  0 siblings, 5 replies; 71+ messages in thread
From: Juri Linkov @ 2005-03-09  7:05 UTC (permalink / raw)
  Cc: Jari Aalto+mail.emacs

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/

^ permalink raw reply	[flat|nested] 71+ messages in thread
* Re: Key binding M-g should really be goto-line autolearn=noversion=3.0.2 autolearn=no version=3.0.2
@ 2005-03-05  0:24 Miles Bader
  2005-03-05  0:49 ` Key binding M-g should really be goto-lineautolearn=noversion=3.0.2 " Drew Adams
  0 siblings, 1 reply; 71+ messages in thread
From: Miles Bader @ 2005-03-05  0:24 UTC (permalink / raw)
  Cc: Kevin Rodgers, emacs-devel

On Fri, 04 Mar 2005 18:45:32 -0500, Richard Stallman <rms@gnu.org> wrote:
> How about making goto-line suggest the number at point
> as its default argument?

That seems very convenient!

I think it may also be convenient if, point is not on a number, use
the first number on the current line as a default.

This is because I think it's common to have point sitting at the
beginning of an error line, and this would save users the effort of
manually positioning point over the actual line number (the heuristic
could fail in some cases if for instance a filename contained digits,
but I think it would often be right).

BTW, also maybe the prompt in the "use last selected buffer" case
should mention the buffer name.

Thanks,

-Miles
-- 
Do not taunt Happy Fun Ball.

^ permalink raw reply	[flat|nested] 71+ messages in thread
* Key binding M-g should really be goto-line
@ 2005-03-01 22:58 Jari Aalto+mail.emacs
  2005-03-01 23:35 ` David Kastrup
                   ` (6 more replies)
  0 siblings, 7 replies; 71+ messages in thread
From: Jari Aalto+mail.emacs @ 2005-03-01 22:58 UTC (permalink / raw)
  Cc: jari.aalto


[please keep CC, I'm not in this list]

I noticed that in CVS lisp/ the M-g mapping reads:

  ldefs-boot.el: (define-key global-map "\M-g" 'facemenu-keymap)

A while ago there was a long discussion:

  http://lists.gnu.org/archive/html/emacs-devel/2004-03/msg00642.html

But I dare to open this question again. I understood that the goal of
keeping M-g where is now is was that in some distant foggy future it might
be used for text editing. 

    http://lists.gnu.org/archive/html/emacs-devel/2004-03/msg00642.html
    From: Richard Stallman

    "I want Emacs to move in the direction of doing word processing.  It
    may take years, but we will get there.  Then commands to specify faces
    will become important, and will need a good key binding.

    I chose the M-g binding for that reason, and the reason continues to
    have force.  So I don't intend to change that binding."

Please, I have been watching this future over 10 years now and in the mean
time hundreds or thousands developers / code writers / designers / students
/ teachers are all using

    M-g to mean goto-line

Is there no hope to see the 'facemenu-keymap moved to another key and have
the goto-line solely for M-g? It really cannot be replaced by M-x compile /
M-x grep or other specialized modes that offer "direct to line" jump
commands. Line numbers can come from many outside sources, like:

    o   Remote sessions; you're editing two copies of Version controlled 
        files
    o   Other programming languages; Like PHP which display errors and
        line numbers in web page itself (can't use Emacs)
    o   Numerous other utilities (like Web link checkers, when you
        edit the file in Emacs)

To make it short: from accessibility point of view, the goto-line
functionality would be far more important and widely used in everyday Emacs
session and ad hoc use, than the current facemenu-keymap functionality. 

Jari

^ permalink raw reply	[flat|nested] 71+ messages in thread

end of thread, other threads:[~2005-03-21  1:18 UTC | newest]

Thread overview: 71+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-09  7:05 Key binding M-g should really be goto-line Juri Linkov
2005-03-09  7:53 ` Miles Bader
2005-03-09  8:32 ` Kim F. Storm
2005-03-10  6:28   ` Juri Linkov
2005-03-09  9:58 ` David Kastrup
2005-03-09 10:47   ` Miles Bader
2005-03-09 13:17     ` David Kastrup
2005-03-09 11:27   ` Kim F. Storm
2005-03-10  9:18     ` Piet van Oostrum
2005-03-10 10:16       ` Miles Bader
2005-03-10 10:47       ` Kim F. Storm
2005-03-10 12:21         ` M-g binding in Gnus (was: Key binding M-g should really be goto-line) Reiner Steib
2005-03-10 12:59           ` M-g binding in Gnus Kim F. Storm
2005-03-10 13:34             ` Reiner Steib
2005-03-10 15:18               ` Kim F. Storm
2005-03-10  2:03   ` Key binding M-g should really be goto-line Richard Stallman
2005-03-10  7:28   ` Key binding M-g should really be goto-line (To M-g M-g or not to M-g) Jari Aalto
2005-03-10 10:49     ` David Kastrup
2005-03-11  7:07     ` Jari Aalto
2005-03-09 21:51 ` Key binding M-g should really be goto-line Romain Francoise
2005-03-09 22:34   ` David Kastrup
2005-03-10  0:33     ` Miles Bader
2005-03-10  0:54       ` David Kastrup
2005-03-10  1:28       ` Johan Bockgård
2005-03-10  6:29         ` Juri Linkov
2005-03-10  7:24           ` Romain Francoise
2005-03-10 10:48             ` David Kastrup
2005-03-10 11:41               ` Romain Francoise
2005-03-10 13:23                 ` Andreas Schwab
2005-03-10 15:19                   ` Kim F. Storm
2005-03-18 10:27 ` Romain Francoise
2005-03-18 12:11   ` M-g suffixes. Was: " David Kastrup
2005-03-18 12:59     ` Romain Francoise
2005-03-18 13:17       ` David Kastrup
2005-03-18 13:58     ` Stefan Monnier
2005-03-18 18:59       ` Gaetan Leurent
2005-03-19  3:09   ` Richard Stallman
2005-03-19  9:20     ` David Kastrup
2005-03-20 14:41     ` Romain Francoise
2005-03-21  1:18       ` Richard Stallman
  -- strict thread matches above, loose matches on Subject: below --
2005-03-05  0:24 Key binding M-g should really be goto-line autolearn=noversion=3.0.2 autolearn=no version=3.0.2 Miles Bader
2005-03-05  0:49 ` Key binding M-g should really be goto-lineautolearn=noversion=3.0.2 " Drew Adams
2005-03-05  1:27   ` Miles Bader
2005-03-05 19:00     ` Stefan Monnier
2005-03-05 20:22       ` Key binding M-g should really be goto-line Johan Bockgård
2005-03-05 23:16         ` Miles Bader
2005-03-06  9:50           ` David Kastrup
2005-03-01 22:58 Jari Aalto+mail.emacs
2005-03-01 23:35 ` David Kastrup
2005-03-02  4:50   ` Eli Zaretskii
2005-03-02  5:39     ` Nick Roberts
2005-03-02  6:24     ` Miles Bader
2005-03-02  8:31     ` Key binding M-g should really be goto-line autolearn=no version=3.0.2 Jari Aalto+mail.emacs
2005-03-02 12:17       ` Key binding M-g should really be goto-line autolearn=no version=3.0.2 " Jari Aalto+mail.linux
2005-03-02 13:42         ` Key binding M-g should really be goto-line Kim F. Storm
2005-03-01 23:49 ` Alfred M. Szmidt
2005-03-02  1:00   ` Ralf Angeli
2005-03-02  1:14     ` Alfred M. Szmidt
2005-03-02  8:08       ` Ralf Angeli
2005-03-02  1:19     ` David Kastrup
2005-03-02 13:40   ` Robert J. Chassell
2005-03-02  2:06 ` Luc Teirlinck
2005-03-03  2:29   ` Richard Stallman
2005-03-02  9:24 ` Kai Großjohann
2005-03-02 11:15 ` Jari Aalto+mail.emacs
2005-03-02 13:52   ` Alfred M. Szmidt
2005-03-02 14:50     ` Josh Varner
2005-03-02 16:38       ` Alfred M. Szmidt
2005-03-02 17:16         ` Reiner Steib
2005-03-02 17:52           ` Alfred M. Szmidt
2005-03-02 19:01           ` Johan Bockgård
2005-03-02 20:23             ` Gaetan Leurent
2005-03-02 20:46               ` Miles Bader
2005-03-02 20:33             ` Alfred M. Szmidt
2005-03-02 15:38   ` Jari Aalto
2005-03-03  2:29 ` Richard Stallman
2005-03-03  7:19 ` Jari Aalto

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).