[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: |
Fri, 14 Sep 2018 02:20:15 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) |
>> 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 still don't get why you need to know whether the image-mode buffer
> comes to top in order to decide on resizing the image.
For example, visit an image, type `C-h i', resize the window, type `C-x k RET'
(not `q', because `q' restores previous window sizes), then the image is not
updated to fit the resized window.
>> 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.
>
> This must be a bug but I don't understand how it could happen.
> 'switch-to-prev-buffer' calls 'set-window-buffer-start-and-point'
> which calls 'set-window-buffer' which calls 'record-window-buffer'
> which should call 'buffer-list-update-hook'. Can you trace while it
> fails for you?
Trying to put to image-mode:
(add-hook 'buffer-list-update-hook
(lambda () (message "buffer-list-update-hook %S"
(current-buffer))) nil t)
shows in *Messages* that it's called only when navigating away from the
image-mode buffer, but not when coming back to the image-mode buffer, e.g.
`C-x <left>', then resize the window, then type `C-x <right>',
it's not called. Also it's not called in another direction:
`C-x <right>', then resize the window, then type `C-x <left>'.
- 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, 2018/09/12
- 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 <=
- 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
- bug#32672: 27.0.50; image resize on window resizing, martin rudalics, 2018/09/20
- bug#32672: 27.0.50; image resize on window resizing, Juri Linkov, 2018/09/20