GNU bug report logs -
#28844
26.0.90; display-line-numbers-mode should call window-configuration-change-hook
Previous Next
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
Message #47 received at 28844 <at> debbugs.gnu.org (full text, mbox):
On Tue, 17 Oct 2017, at 12:41 PM, Eli Zaretskii wrote:
> > 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.
>
> But if you always call line-number-display-width, you don't need to
> know that, because that function will return the current value (which
> will change to reflect the changes in the space taken by line
> numbers).
>
> So I don't think I understand the problem, and without that I cannot
> think of a solution. Can you clarify the problem, please?
Eli, you’re fundamentally misunderstanding something:
1. Your mode updates the display.
2. Another lisp program does not know your mode has updated the display.
3. Therefore, the lisp program will not know to call line-number-display-width.
Your suggestion that other modes should “always” call line-number-display-width is what... to run an infinite loop waiting for your mode to furtively update the display and catch it then?
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.