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 #38 received at 9917 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 5042 <at> debbugs.gnu.org, 9917 <at> debbugs.gnu.org,
 Dani Moncayo <dmoncayo <at> gmail.com>
Subject: Re: bug#9917: 24.0.90; Make `goto-line' consistent with the line
 number from the minibuffer
Date: Sat, 19 Sep 2020 14:01:07 -0400
> The suggestion here is to make the interactive `goto-line' go to the
> narrowed-to line instead of the absolute line.  I can see the reasoning
> here -- especially after `display-line-numbers-mode' was added,
> displaying line numbers seems to be getting more popular, and having
> `M-x goto-char' not going to the number you're seeing (if the buffer is
> narrowed) sounds confusing.

I agree that the same should be used for `M-g g` and for the numbers
displayed in `display-line-numbers-mode' or in the mode-line.  I think
all those need some common way to decide if the first line is at
`point-min` or somewhere else.

> But it is a breaking change -- somewhat.  `goto-line' isn't supposed to
> be used in code, and isn't used in-tree, but who knows what people have
> done out there...

Agree.  We used to have calls to `goto-line` in our code, so there's
probably more in the wild.

> We could bind `M-g g' (and friends) to a new command that acts this
> new way?

Fine by me,


        Stefan





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.