[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Suggestion: Mapping of M-g should be goto-line
From: |
Kim F. Storm |
Subject: |
Re: Suggestion: Mapping of M-g should be goto-line |
Date: |
31 Mar 2004 11:30:23 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 |
address@hidden (Jari Aalto+mail.emacs) writes:
> The "de facto" situation for long has been that everybody maps
> M-g to goto-line. People advice that in newsgroups, because it
> is indeed the most logical key.
>
> If we would take a poll in Emacs newsgroups, presumably the
> "yes" votes for goto-line would win in great majority.
>
> It would be better if Emacs supported this 99 % daily usage of
> M-g, instead of current not-so-useful binding.
It occurred to me that you can have your cake and eat it too:
Try this little trick:
(defun goto-line-piggyback ()
(interactive)
(goto-line
(string-to-int
(read-string "Goto line: "
(substring (this-command-keys) -1)))))
(dolist (digit '(?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9))
(define-key facemenu-keymap (vector digit) 'goto-line-piggyback))
Eval and try M-g 123 RET
Or course, the feedback in the minibuffer when you hit M-g is far from
perfect, and C-h k M-g still gives odd results...
--
Kim F. Storm <address@hidden> http://www.cua.dk
- Re: Suggestion: Mapping of M-g should be goto-line, (continued)
- Re: Suggestion: Mapping of M-g should be goto-line, Joachim Nilsson, 2004/03/27
- Re: Suggestion: Mapping of M-g should be goto-line, Richard Stallman, 2004/03/27
- Re: Suggestion: Mapping of M-g should be goto-line, Joachim Nilsson, 2004/03/28
- Re: Suggestion: Mapping of M-g should be goto-line, David Kastrup, 2004/03/28
- Re: Suggestion: Mapping of M-g should be goto-line, Robert J. Chassell, 2004/03/28
- Re: Suggestion: Mapping of M-g should be goto-line, Stefan Monnier, 2004/03/28
- Re: Suggestion: Mapping of M-g should be goto-line, Miles Bader, 2004/03/28
- Re: Suggestion: Mapping of M-g should be goto-line, Richard Stallman, 2004/03/29
Re: Suggestion: Mapping of M-g should be goto-line,
Kim F. Storm <=