Subject: Re: bug#21333: 25.0.50; window-size-change-functions not called after mini-window resize

From: Eli Zaretskii <[email-masked]>
Date: Wed, 26 Aug 2015 18:36:26 +0300

> Date: Wed, 26 Aug 2015 10:07:28 +0000
> From: Pip Cet <[email-masked]>
> Cc: Eli Zaretskii <[email-masked]>, [email-masked]
> 
> >> So an alternative that doesn't need any hook is
> >> simply to recompute the coordinates every time they are needed.  It's
> >> not like this calculation is expensive, is it?
> >
> > Correct.
> 
> I disagree, if I understand correctly. The coordinates might be passed
> to another program, for example, and then we simply don't know when
> that program decides to use them, so we still need a way to update our
> (and its) idea of what the window size and position is, in my opinion.

If we don't know enough about that imaginary program, how do we know
it is interested in ephemeral resizes such as the one being discussed?

More generally, it is impossible to reason about a theoretical use
case whose details are not revealed, while you alone keep the right to
introduce additional traits that help you make your point, without
describing the whole picture.  A problem should be solved top-down, by
starting with an overall description.  It cannot be solved bottom up,
one detail at a time.

> > So ‘window-size-change-functions’ is dispensable.
> 
> Iff we keep/fix pre-redisplay-function, I agree.

There are no plans to retire it any time soon.  Quite the contrary,
I'd say.

> > OTOH for the person who
> > writes the function on the hook it might hardly matter whether some
> > window size really changed.  The more important case might be to not
> > miss one single case where the size really changes.
> 
> Precisely.

There are simpler ways not to miss those events, using much simpler
hooks.  Like post-command-hook, for example.