emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Native line numbers display and tab stops


From: Stephen Berman
Subject: Re: Native line numbers display and tab stops
Date: Sat, 24 Jun 2017 01:02:47 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

On Fri, 23 Jun 2017 15:27:46 -0700 John Wiegley <address@hidden> wrote:

>>>>>> "EZ" == Eli Zaretskii <address@hidden> writes:
>
> EZ> When you switch on line numbers, text of all lines is pushed to the right,
> EZ> but tab stops are left in the same horizontal position. They are all left
> EZ> at that position, so they still line up.
>
> Not having tried it, but that does sound counter-intuitive at first glance...

The interaction with goal-column is odd.  E.g. in *scratch*:

1. M-x fundamental-mode
2. M-: (setq display-line-numbers t)
3. M-x column-number-mode
4. TAB push the text of first line rightward, so that the first `;' is
   positioned on `o' in `To' on the second line, which the mode line
   indicates is column 8.
5. C-x C-n SPC to set the goal-column to 8.
6. C-n to move down to the second line.
=> Point is now not on the `o' in `To' but on the `e' in `create', four
   columns to the right (but still column 8 according to the mode line
   indicator).  In other words, though the movement correctly preserves
   the goal column, visually it appears not to.

The same effect happens when setting line-prefix (as expected, given
what Eli pointed out).

Steve Berman



reply via email to

[Prev in Thread] Current Thread [Next in Thread]