bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#32637: 27.0.50; window-size-change-functions not run from local hook


From: Eli Zaretskii
Subject: bug#32637: 27.0.50; window-size-change-functions not run from local hook
Date: Sun, 09 Sep 2018 09:03:20 +0300

> From: Juri Linkov <juri@linkov.net>
> Date: Sun, 09 Sep 2018 02:56:35 +0300
> Cc: 32637@debbugs.gnu.org
> 
> > I meant that running 'window-size-change-functions' in a buffer-local
> > fashion when no window showing that buffer has changed its size might
> > be misleading.
> 
> window-size-change-functions calling code could detect if a window with
> a buffer-local hook changed its size, and not to call its hook in this
> case.  This would be even better than using global hook where you can't
> implement such optimization.

This might be very hard to implement, given how these hooks are called
today.  In fact, it might be impossible to implement without changing
the strategy of running this hook, and that could very well change the
semantics of the hook, and break some existing packages that use them.

> > But put a buffer-local function on 'window-configuration-change-hook'
> > and show the buffer in two windows.  The function gets called twice
> > with the respective window selected.  So if we implemented
> > 'window-size-change-functions' in the same way as you suggested
> > earlier, you would "find all Man windows on the frame to compare their
> > sizes and reformat the buffer with the minimim width from all its
> > windows" twice.  How would you deal with that?
> 
> window-size-change-functions calling code could call it only once
> for every frame, even if the same buffer is displayed in multiple
> windows.

AFAIK, window-size-change-functions is already called once per frame,
so I'm not sure what you are saying here.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]