From: Juri Linkov <juri@linkov.net>
To: martin rudalics <rudalics@gmx.at>
Cc: 32637@debbugs.gnu.org
Subject: bug#32637: 27.0.50; window-size-change-functions not run from local hook
Date: Fri, 07 Sep 2018 01:06:56 +0300 [thread overview]
Message-ID: <87tvn2ffgf.fsf@mail.linkov.net> (raw)
In-Reply-To: <5B90D1B8.1000203@gmx.at> (martin rudalics's message of "Thu, 06 Sep 2018 09:05:28 +0200")
> From an application programmer's view the expected behavior of running
> 'window-size-change-functions' buffer-locally would be to call the
> function (1) only if a window displays the buffer now and (2) only if
> the size of that window actually changed. And it should call the
> function with that window as argument. Which means that for any
> buffer the function could be called as many times as a window showing
> the buffer has changed its size. It also means that we don't call the
> function when a buffer has disappeared from the frame.
>
> Now since the argument of 'window-size-change-functions' is the
> associated frame, I agree with Eli that running it buffer-locally
> doesn't make much sense. The apparent gain in convenience is dwarfed
> by the fact that one would still have to find the window(s) showing
> the buffer.
But in bug#32536 you agreed that Man-window-size-change has to
take care of cases where buffer-local window-size-change-functions
needs to find all Man windows on the frame to compare their sizes
and reformat the buffer with the minimim width from all its windows.
So the window-size-change-functions hook should call the function not
with the window as argument, but with the whole frame, as it already
does now. And to call the buffer-local hook only once for all
affected windows, as it already does now (the hook has responsibility
to find all its windows from the frame).
> And I still think that running 'window-configuration-change-hook'
> buffer-locally in its current from hardly makes sense either: For
> example, we don't call it for a buffer when that buffer has been
> removed from a window which incidentally is the case that would allow
> Man to remove its function from 'window-configuration-change-hook'.
There is no need to remove function from the buffer-local hook,
because it is called only when the buffer is displayed
in a window.
next prev parent reply other threads:[~2018-09-06 22:06 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-04 21:03 bug#32637: 27.0.50; window-size-change-functions not run from local hook Juri Linkov
2018-09-05 7:47 ` martin rudalics
2018-09-05 15:26 ` Eli Zaretskii
2018-09-05 21:56 ` Juri Linkov
2018-09-06 2:35 ` Eli Zaretskii
2018-09-06 22:17 ` Juri Linkov
2018-09-05 21:54 ` Juri Linkov
2018-09-06 7:05 ` martin rudalics
2018-09-06 22:06 ` Juri Linkov [this message]
2018-09-07 7:31 ` martin rudalics
2018-09-08 23:56 ` Juri Linkov
2018-09-09 6:03 ` Eli Zaretskii
2018-09-09 8:40 ` martin rudalics
2018-09-09 15:59 ` Eli Zaretskii
2018-09-10 8:29 ` martin rudalics
2018-09-09 16:17 ` Juri Linkov
2018-09-10 8:29 ` martin rudalics
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87tvn2ffgf.fsf@mail.linkov.net \
--to=juri@linkov.net \
--cc=32637@debbugs.gnu.org \
--cc=rudalics@gmx.at \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.