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
View this message in rfc822 format
> From: Paul Rankin <hello <at> paulwrankin.com>
> Date: Sun, 10 Dec 2017 01:30:41 +1000
>
> I’m sorry Eli, and everyone else in this thread. I should have shown
> gratitude for your help instead of such arrogance.
Thanks.
> > For example,
> > what should happen if the user enlarges or makes smaller the default
> > face's font with the likes of "C-x +”?
>
> The basic idea of the package is to take a text body width value
> (integer or float) and keep the margins balanced on either side in each
> window the buffer is displayed. Whenever anything display-related
> changes, the package calls olivetti-set-environment. This function calls
> olivetti-scale-width to account for any changes to the font size.
I see. This does work with "C-x +", but when I try changing the font
size via mouse-appearance-menu (by clicking S-mouse-1), the margins
seem to not react to the change. (I was mistaken above to ask about
"C-x +", the problem is with selecting a font from the font menu.)
> I’m going to implement post-command-hook as you suggested, and once the
> API for line-number-display-width is locked I will call that to account
> for display-line-numbers.
Sounds like a good idea. Let me know if you need help in using the
current line-number-display-width as part of implementing this idea.
I think with the current APIs you want to call
line-number-display-width with the optional argument 'columns'. This
is especially important if the 'line-number' face is customized to use
a font different from the one used to display the buffer text.
> You know, the silly thing is... olivetti is designed for prose writing,
> most people will never use it in conjunction with line numbers...
I know. I myself never use line numbers, and only wrote the code
because so many people do via linum.el and similar packages, and then
complain that Emacs redisplay slows down too much.
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.