bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#32672: 27.0.50; image resize on window resizing


From: martin rudalics
Subject: bug#32672: 27.0.50; image resize on window resizing
Date: Tue, 25 Sep 2018 09:27:39 +0200

> Maybe because taking out window size change notifications from
> window-configuration-change-hook is a backward-incompatible change?

Certainly so.  But we now have the situation that only parts of the
size changes are reflected in calls of
'window-configuration-change-hook'.  I almost certainly will reinstate
the call for frame size changes because of Bug#32720.  But I won't
cover minibuffer window induced size changes.  Apparently there's no
harm in that because most callers of
'window-configuration-change-hook' are only interested in changes of
window widths (and as such will be affected when the body width of a
window changes with its total width unchanged).

>>> and window-scroll-functions (also called too often).
>>
>>> Regarding window-scroll-functions, it would be too strange to use
>>> it to catch set-window-buffer calls.
>>>
>>> (info "(elisp) Window Hooks") says:
>>>
>>>     There are three actions that can change this: scrolling the window,
>>>     switching buffers in the window, and changing the size of the window.
>>>     The first two actions run ‘window-scroll-functions’; the last runs
>>>     ‘window-size-change-functions’.
>>>
>>> Shouldn't the first two actions run separate hooks?
>
> Please also answer this question.  I believe this is the crucial question
> for this request.

I have no answer to this question.  But note that switching buffers
also runs 'window-configuration-change-hook'.  The latter is not run
when just the start position of that window's buffer changes.

> Sorry, actually it works, I missed the logged messages because the content
> of the *Messages* buffer is not refreshed to show new logged messages
> from the calls of the window-scroll-functions hook such as
>
>    (add-to-list 'window-scroll-functions
>                 (lambda (window display-start)
>                   (message "window-scroll-functions %S %S %S"
>                            window (window-buffer window) display-start)))
>
> This means that C-l (recenter-top-bottom) doesn't redisplay the frame -
> which is strange since it calls 'recenter' with non-nil arg REDISPLAY.
> Only after switching to the *Messages* buffer with 'C-x o' it gets
> redisplayed and all previously emitted messages appear in it.

I never recenter so I have no idea what to expect from that function.
But from the doc I assume that you have to set 'recenter-redisplay'
appropriately.

martin






reply via email to

[Prev in Thread] Current Thread [Next in Thread]