GNU bug report logs - #9917
24.0.90; Make `goto-line' consistent with the line number from the minibuffer

Previous Next

Package: emacs;

Reported by: Dani Moncayo <dmoncayo <at> gmail.com>

Date: Mon, 31 Oct 2011 14:34:01 UTC

Severity: wishlist

Merged with 5042, 16173

Found in versions 24.0.90, 24.3.50

Forwarded to http://lists.gnu.org/archive/html/emacs-devel/2010-06/msg00143.html

Full log


Message #107 received at 9917 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, dmoncayo <at> gmail.com, 9917 <at> debbugs.gnu.org,
 monnier <at> iro.umontreal.ca, 5042 <at> debbugs.gnu.org
Subject: Re: bug#9917: bug#5042: bug#9917: 24.0.90; Make `goto-line'
 consistent with the line number from the minibuffer
Date: Thu, 29 Oct 2020 11:19:11 +0200
>>> So a new command and keystroke seems warranted.  How about...
>>> `M-g M-v'?   (The mnemonic is "goto visual line".)
>>
>> Or to add a new key to narrow-map 'C-x n' where a new key could be:
>>
>>   C-x n g         go to narrowed line
>
> Perhaps both?  The keystroke makes sense in both contexts -- as a
> variation on `M-g M-g', and in the group of narrowing keystroke.

I've added a more localized key binding 'C-x n g',
but still not sure about the global 'M-g' key bindings.
Here are some possible variants:

1. Bind 'M-g v' to goto-line-relative, while leaving 'M-g g'
   bound to goto-line that currently uses absolute line numbers
   (btw, this fact should be mentioned in its docstring);

2. Re-bind 'M-g g' to goto-line-relative as many asked to do
   with the reasoning that 'M-g g' should use by default the
   same numbering scheme as is displayed by display-line-numbers-mode;

3. Leave the existing 'M-g g' bound to goto-line, but allow changing
   the numbering scheme using a prefix arg and a user option.
   Or another idea: maybe it should depend on whether
   display-line-numbers-mode is enabled or not?
   When display-line-numbers-mode is enabled, then use
   relative line numbers that are displayed on the left side (WYSIWYG).




This bug report was last modified 4 years and 225 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.