GNU bug report logs - #28844
26.0.90; display-line-numbers-mode should call window-configuration-change-hook

Previous Next

Package: emacs;

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

Date: Sun, 15 Oct 2017 07:57:01 UTC

Severity: minor

Found in version 26.0.90

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Paul Rankin <hello <at> paulwrankin.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 28844 <at> debbugs.gnu.org, agrambot <at> gmail.com
Subject: bug#28844: 26.0.90; display-line-numbers-mode should call window-configuration-change-hook
Date: Tue, 17 Oct 2017 10:35:57 +1000
On Tue, 17 Oct 2017, at 12:48 AM, Eli Zaretskii wrote:
> > From: Paul Rankin <hello <at> paulwrankin.com>
> > Cc: Eli Zaretskii <eliz <at> gnu.org>, 28844 <at> debbugs.gnu.org
> > Date: Mon, 16 Oct 2017 15:14:10 +1000
> > 
> > > To see if line numbers are present in a buffer (and to make it
> > > compatible with older Emacsen), you should use something like:
> > > 
> > > (bound-and-true-p display-line-numbers)
> 
> Indeed, if the problem is with determining whether
> line-number-display-width should be called, then bound-and-true-p is
> the way.  Sorry I didn't realize this was the issue.
> 
> > Sweet, thanks! I’ve encountered another bug with this mode #28855, so I think until it gets its house in order, the best thing to go with is:
> > (if (bound-and-true-p display-line-numbers) (display-line-numbers-mode 0))
> 
> So does this mean the issue in this bug report (which AFAIU was how to
> set the window's display margins in a way that is sensitive to
> display-line-numbers-mode) is resolved for you?  Or is there anything
> else to be done about this?  (Bug#28855 is a separate issue, I will
> respond to that there.)

Your mode updates the display on its own without notifying Emacs. The basic conceptual problem is that “every time you need the value” is predicated on when display-line-numbers-mode changes the value. There’s no way for another lisp program to know when that is.




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

Previous Next


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