Subject: Re: bug#28855: 26.0.90; display-line-numbers-mode does not respect (line|wrap)-prefix '(space :align-to N) text property

From: Eli Zaretskii <[email-masked]>
Date: Wed, 18 Oct 2017 21:05:09 +0300

> Date: Wed, 18 Oct 2017 19:44:50 +0200
> From: martin rudalics <[email-masked]>
> CC: [email-masked], Stefan Monnier <[email-masked]>, 
>  John Wiegley <[email-masked]>
> 
> If someone wants the current behavior, we could add
> a "special element" like 'line-number-display-start' such that
> 
> :align-to 0
> 
> would behave like
> 
> :align-to (+ line-number-display-start (line-number-display-width t))
> 
> for LTR text.

Actually, it's the other way around: the current behavior is that
:align-to always starts counting from the window edge, even if line
numbers are displayed, so the effect of ":align-to N" is as if N has
been reduced by the screen space used for displaying the numbers.  The
changes I'm about to install make :align-to work as you described
above, i.e. start measuring the offset from where the line-number
display ends.

After the change, if someone wants to always measure the offset from
the window edge, they could/should use

  :align-to (+ left-fringe left-fringe N)

Here the first occurrence of left-fringe stands for the position of
the left edge of the left fringe, and the second occurrence stands for
the width of the left fringe (these rules were always in effect, see
the ELisp manual, under "Pixel Specification").