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

Previous Next

Package: emacs;

Reported by: Paul Rankin <hello <at> paulwrankin.com>

Date: Mon, 16 Oct 2017 03:39:01 UTC

Severity: normal

Found in version 26.0.90

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 28855 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Paul Rankin <hello <at> paulwrankin.com>
Cc: 28855 <at> debbugs.gnu.org, dgutov <at> yandex.ru
Subject: Re: bug#28855: 26.0.90;
 display-line-numbers-mode does not respect (line|wrap)-prefix '(space
 :align-to N) text property
Date: Tue, 17 Oct 2017 05:44:51 +0300
> From: Paul Rankin <hello <at> paulwrankin.com>
> Cc: Dmitry Gutov <dgutov <at> yandex.ru>, 28855 <at> debbugs.gnu.org
> Date: Tue, 17 Oct 2017 10:47:11 +1000
> 
> On Tue, 17 Oct 2017, at 02:05 AM, Eli Zaretskii wrote:
> > Right, :align-to still counts from the window edge, even when line
> > numbers are displayed, whereas you expected it to count from the end
> > of the line-number display.
> 
> linum-mode.el (in 26.x) manages to display line numbers without interfering, so it’s really just about display-line-numbers-mode.

Yes, of course.  linum-mode displays the numbers in the display
margin, and keeping off the margins was an explicit design goal of
display-line-numbers-mode.

> > When this was briefly discussed during development, we decided not to
> > change the reported window dimensions and geometry, including those of
> > the text area, to account for the screen estate taken by the
> > line-number display.  But maybe :align-to should be an exception, when
> > used to align buffer text (as opposed to header-line or mode-line)?
> > Though I'm bothered whether some users of :align-to may not want this
> > automatic offset.  :align-to is a very popular feature; does anyone
> > know or imagine why a Lisp program would NOT like such an offset?
> 
> Citing other discussions is not really relevant, if there’s a problem there’s a problem. User expectation is if a user writes codes following the Elisp manual, the expectation is that it should continue to work. In this case, using :align-to should align to its specified value.

:align-to does align to its value, it just doesn't currently update it
to account for the space taken by line numbers.

It's clear that the change I have in mind will solve your specific
problem, I just want to hear from others whether it could harm
something.




This bug report was last modified 7 years and 218 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.