Subject: bug#32672: 27.0.50; image resize on window resizing

From: martin rudalics <[email-masked]>
Date: Thu, 20 Sep 2018 09:34:22 +0200

>>> 2 ... current: *scratch* ... window-buffer: *info*
 >>>
 >>> which is in an inconsistent state,
 >>
 >> ... not really - look at the backtrace:
 >
 > But the problem is that the buffer-local hook will have such idiomatic code:
 >
 >    (with-current-buffer (window-buffer window)
 >      ...

Where does 'window' come from?  At the time 'buffer-list-update-hook'
gets called, there's no guarantee that the buffer whose local hook
runs is even shown in a window.

 > where window-buffer will return a wrong buffer.

It's the right buffer at the time you run this hook.  I'm afraid that
whatever we do here it will get us in a mess that strikes back sooner
or later.  Maybe we really should run a 'select-window-hook' instead.

martin