GNU bug report logs -
#32672
27.0.50; image resize on window resizing
Previous Next
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
Message #110 received at 32672 <at> debbugs.gnu.org (full text, mbox):
>> I think window hook calls should be consistent at least with own inner logic,
>> e.g. as the semantics of the window-size-change-functions hook name suggests
>> it should be called when the window size is not the same as was before,
>> window-configuration-change-hook is called when the result of window-state-get
>> is not the same as it was before, etc.
>
> Tying 'window-configuration-change-hook' to 'window-state-get' would
> be considerably more than we do now or what I'd propose. We probably
> shouldn't care about a specific window's scroll bars or margins there.
Your proposed window-state-change-functions would match window-state-get
very well, e.g. it could call the hook with an argument containing alist
of values that really changed, where elements of the alist could have
the same keys as in alist returned from window-state-get, for example:
(add-hook 'window-state-change-functions (lambda (window alist) ...) nil t)
where 'alist' could have such keys and values of changes:
(buffer "*scratch*") - means the buffer was switched in the window
(selected) - the window was selected
(start . #<marker at 146 in *scratch*>) - the same meaning as for
window-scroll-functions
(pixel-width . 672) (pixel-height . 557) - the same meaning as for
window-size-change-functions
maybe also include
(pixel-width-before-size-change . 672)
(pixel-height-before-size-change . 557)
with the same meaning as window-pixel-width-before-size-change
and window-pixel-height-before-size-change
or with shorter names
(prev-pixel-width . 672)
(prev-pixel-height . 557)
then it makes sense to add also
(prev-buffer "*scratch*")
(prev-start . #<marker at 146 in *scratch*>)
Or maybe simpler to call the hook with two arguments
containing the whole state data structures:
(add-hook 'window-state-change-functions (lambda (window prev-state next-state) ...))
but then it's difficult for its consumer to find the differences.
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.