GNU bug report logs - #32672
27.0.50; image resize on window resizing

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Sun, 9 Sep 2018 16:11:02 UTC

Severity: wishlist

Tags: fixed

Fixed in version 27.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 32672 <at> debbugs.gnu.org, juri <at> linkov.net
Subject: bug#32672: 27.0.50; image resize on window resizing
Date: Tue, 25 Sep 2018 12:19:09 +0300
> Date: Tue, 25 Sep 2018 09:26:47 +0200
> From: martin rudalics <rudalics <at> gmx.at>
> CC: juri <at> linkov.net, 32672 <at> debbugs.gnu.org
> 
>  >> As I said, redisplay would not have to care about that at all.  It
>  >> would simply call 'window-state-change-functions' where it calls
>  >> 'window-size-change-functions' now.  And running
>  >> 'window-state-change-functions' would use one boolean set (among
>  >> others) instead of where 'run-window-configuration-change-hook' gets
>  >> called now and which it resets.  Iff that boolean was set, it would
>  >> start to find all windows where a relevant change occurred and run the
>  >> functions.  Buffer-locally iff a window shows the buffer for which the
>  >> local hook was set and something changed for that window.
>  >
>  > Those functions will need to keep track of the changes, or record the
>  > previous state attributes somewhere, to do their job, right?  Are you
>  > saying that these are already recorded/tracked?  If not, they will
>  > need to be added, which was the point I was making.
> 
> I'm not sure what you mean with "Those functions".

I mean window-state-change-functions, what else?

> Running 'window-size-change-functions' already records the current
> sizes in preparation for the call during next redisplay.
> 'window-state-change-functions' would do the same for the values it
> manages.

We are talking about hypothetical function(s), so it may well be that
there's some misunderstanding.  My point is that accurate recording of
window-size changes is hard, because the various variables used for
that might be outdated (e.g., due top a redisplay cycle that didn't
complete).  Also, redisplay_internal, which calls those functions,
will sometimes call them more than once in a redisplay cycle (see the
'retry' label and code that jumps back to it).

Bottom line is what I said up-thread: Lisp programs cannot expect
those hook calls to be too accurate and focused, they need to be
prepared to handle many irrelevant calls, and they had better have
their own bookkeeping regarding window dimensions etc.

>  > Even the "once" part might be problematic, because redisplay_internal
>  > sometimes re-runs its code more than once, as you know.  The "really
>  > changed since last redisplay" is even trickier, because a given
>  > redisplay cycle doesn't always finish all of its job, it can stop in
>  > the middle and return after doing only part of what needs to be done,
>  > in which case some of the windows are not updated, and we will have
>  > lost our point of reference.
> 
> What you mention here would affect 'window-size-change-functions'
> already now.  I see no great harm in that.

Neither do I; my point, once again, is that expectations should be
quite low.




This bug report was last modified 5 years and 170 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.