[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#28844: 26.0.90; display-line-numbers-mode should call window-configu
From: |
Paul Rankin |
Subject: |
bug#28844: 26.0.90; display-line-numbers-mode should call window-configuration-change-hook |
Date: |
Sun, 10 Dec 2017 01:30:41 +1000 |
I’d like to acknowledge how much of an ass I’ve been towards Eli in this
thread. I’ve emailed Eli personally, but I think I owe him a public
apology, and an apology to everyone else whom I made uncomfortable with
my increasingly rude and condescending responses towards him.
I had misinterpreted Eli’s earlier responses to me as dismissive, and
thought he was biased in favour of his own code and was dismissing my
concerns in order to avoid fixing something I thought was wrong/broken.
I made the assumption that post-command-hook would be called many, many
more times than window-configuration-change- hook, an assumption I made
without testing the theory, and then continued attacking him.
Now I realise he wasn’t suggesting post-command-hook as a lazy quick
fix, but this would in fact improve my code.
I’m sorry Eli, and everyone else in this thread. I should have shown
gratitude for your help instead of such arrogance.
> I'm willing to do more, and propose working code, but being unfamiliar
> with your package, I need some help understanding what is the expected
> behavior when certain display-related attributes change. 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'm asking this because the effect on the display margins is similar,
> so I wanted to look what the package does in that case, but it seems
> to do nothing: the margin dimensions are not changed as I'd expect
> them to. So I couldn't do more than just suggest a way to solve this.
> Maybe I missed some setting or knob.
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.
You know, the silly thing is... olivetti is designed for prose writing,
most people will never use it in conjunction with line numbers...