[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#5042: bug#9917: bug#5042: bug#9917: 24.0.90; Make `goto-line' consis
From: |
Juri Linkov |
Subject: |
bug#5042: bug#9917: bug#5042: bug#9917: 24.0.90; Make `goto-line' consistent with the line number from the minibuffer |
Date: |
Fri, 30 Oct 2020 09:27:43 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) |
>> 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;
>
> Two comments:
>
> 1) display-line-numbers-mode by default behaves the same as
> line-number-mode
> 2) display-line-numbers-mode has the display-line-numbers-widen
> option which disregards narrowing, so if you want to follow
> display-line-numbers-mode, you will need to heed that option as
> well
>
>> 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.
>
> I like this the best.
If making the current goto-line 'M-g g' more DWIM is not easy to do,
maybe really a user option could help with such choices:
- always use absolute line numbers;
- always use relative line numbers;
- follow the value of display-line-numbers-widen;
...
Also more explicit keys are needed, e.g.:
M-g l a - with mnemonics: goto line absolute
M-g l r - with mnemonics: goto line relative