[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#69093: window-state-put doesn't update current buffer
From: |
Juri Linkov |
Subject: |
bug#69093: window-state-put doesn't update current buffer |
Date: |
Sat, 24 Feb 2024 19:32:56 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) |
>> 'window-state-put' fails to select the previously selected
>> window's buffer with the property (selected . t).
>
> It should have selected it here
>
> ;; Select window if it's the selected one.
> (when (cdr (assq 'selected state))
> (select-window window))
>
> Please first check whether this 'select-window' call is executed at all
> in your scenario. If it is, please find out which window apparently
> gets selected instead afterwards and try to find out why.
The right window is selected, and its buffer becomes current.
> If there's no clue, you would have to find out who undoes that
> selection first by putting a breakpoint into Fselect_window and, if
> that fails, by putting a breakpoint into select_window (which can be
> a pain).
The problem is that afterwards the same function undoes the setting of
current buffer. In window--state-put-2, select-window is inside
with-current-buffer that undoes the current buffer selection:
(with-current-buffer buffer
...
;; Select window if it's the selected one.
(when (cdr (assq 'selected state))
(select-window window))
Also in window-state-put, with-temp-buffer undoes the current buffer:
(with-temp-buffer
(set-window-buffer window (current-buffer))
(window--state-put-1 state window nil totals pixelwise)
(window--state-put-2 ignore pixelwise))
- bug#69093: window-state-put doesn't update current buffer, (continued)
- bug#69093: window-state-put doesn't update current buffer, Eli Zaretskii, 2024/02/16
- bug#69093: window-state-put doesn't update current buffer, Juri Linkov, 2024/02/18
- bug#69093: window-state-put doesn't update current buffer, martin rudalics, 2024/02/19
- bug#69093: window-state-put doesn't update current buffer, Drew Adams, 2024/02/19
- bug#69093: window-state-put doesn't update current buffer, Juri Linkov, 2024/02/20
- bug#69093: window-state-put doesn't update current buffer, martin rudalics, 2024/02/21
- bug#69093: window-state-put doesn't update current buffer, Juri Linkov, 2024/02/21
- bug#69093: window-state-put doesn't update current buffer, martin rudalics, 2024/02/22
- bug#69093: window-state-put doesn't update current buffer, Juri Linkov, 2024/02/22
- bug#69093: window-state-put doesn't update current buffer, martin rudalics, 2024/02/23
- bug#69093: window-state-put doesn't update current buffer,
Juri Linkov <=
- bug#69093: window-state-put doesn't update current buffer, martin rudalics, 2024/02/25
- bug#69093: window-state-put doesn't update current buffer, Juri Linkov, 2024/02/25
- bug#69093: window-state-put doesn't update current buffer, martin rudalics, 2024/02/26