[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#32672: 27.0.50; image resize on window resizing
From: |
Juri Linkov |
Subject: |
bug#32672: 27.0.50; image resize on window resizing |
Date: |
Thu, 13 Sep 2018 02:18:38 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) |
>> There is still a problem how to catch a moment when an image-mode buffer
>> is displayed after switching to it.
>
> "Switching to a buffer" means to display it ...
>
>> For example, when the selected window
>> is resized while it displayed a non-image-mode buffer, then after that
>> the current buffer switched to the image-mode buffer.
>
> ... so please reformulate this in terms of a sequence of some sort of
> pseudo actions. In Emacs terminology, switching to a buffer implies
> making it current but making a buffer current doesn't imply switching
> to it.
>
>> I can't find a hook
>> that could be activated to resize the image to fit the new sizes of the
>> window.
>
> Tell us which action should trigger such a hook.
It's not straightforward to find a hook that covers all cases, it seems
at least it should be called when an image-mode buffer comes to the top
of buffer-list, and the closest hook for that is buffer-list-update-hook.
I see that when it's buffer-local, then it guarantees that the affected
image-mode buffer is always current-buffer at the time of hook invocation.
It's fired every time the image-mode buffer comes to the top, even when
calling quit-window on another buffer that gives way to the image-mode buffer.
The only case when buffer-list-update-hook doesn't run is when the
image-mode buffer comes to the top by `C-x <C-left>' (previous-buffer),
whereas `C-x <right>' (next-buffer) works fine.
- bug#32672: 27.0.50; image resize on window resizing, Juri Linkov, 2018/09/09
- bug#32672: 27.0.50; image resize on window resizing, Juri Linkov, 2018/09/11
- bug#32672: 27.0.50; image resize on window resizing, martin rudalics, 2018/09/12
- bug#32672: 27.0.50; image resize on window resizing,
Juri Linkov <=
- bug#32672: 27.0.50; image resize on window resizing, martin rudalics, 2018/09/13
- bug#32672: 27.0.50; image resize on window resizing, Juri Linkov, 2018/09/13
- bug#32672: 27.0.50; image resize on window resizing, martin rudalics, 2018/09/14
- bug#32672: 27.0.50; image resize on window resizing, Juri Linkov, 2018/09/15
- bug#32672: 27.0.50; image resize on window resizing, martin rudalics, 2018/09/16
- bug#32672: 27.0.50; image resize on window resizing, Juri Linkov, 2018/09/16
- bug#32672: 27.0.50; image resize on window resizing, martin rudalics, 2018/09/17
- bug#32672: 27.0.50; image resize on window resizing, Juri Linkov, 2018/09/17
- bug#32672: 27.0.50; image resize on window resizing, martin rudalics, 2018/09/19
- bug#32672: 27.0.50; image resize on window resizing, Juri Linkov, 2018/09/19