Subject: Re: bug#9917: 24.0.90; Make `goto-line' consistent with the line number from the minibuffer

From: Stefan Monnier <[email-masked]>
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