[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#33871: 27.0.50; Revert Dired window saved in window configuration
From: |
Juri Linkov |
Subject: |
bug#33871: 27.0.50; Revert Dired window saved in window configuration |
Date: |
Tue, 22 Feb 2022 19:14:27 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) |
>>> How would 'save-window-excursion' handle the case of a dired buffer that
>>> gets reverted while its FORMS are run?
>>
>> 'dired-goto-file' will restore dired-positions after 'save-window-excursion'.
>
> Who calculated those dired-positions and who calls 'dired-goto-file' to
> restore them?
Like in bug#54038 (about having access to windows in window configurations),
the problem is that there is no way to update and even peek inside
a window configuration. In bug#54038 the cleanup function can't tell
if a window is still live in a window configuration.
And here 'dired-revert' can't update windows saved in a window configuration.
'dired-save-positions' goes to great lengths to employ get-buffer-window-list,
and walk-windows with window-prev-buffers to update the Dired buffer
even in window-prev-buffers. And 'dired-restore-positions' with the
same number of lines tries to restore all prev-buffers.
But still 'dired-revert' fails to update the Dired buffer in
window configurations saved in tabs, or in winner.el, or
in 'C-x r w' (window-configuration-to-register), etc.
A possible solution would be to add two hooks:
1. hook before finishing 'current-window-configuration' that will add all
windows to some variable that the cleanup function could check in bug#54038.
This is like 'dired-save-positions'.
2. hook after calling 'set-window-configuration' that will restore
previous positions. This is like 'dired-restore-positions' that
uses 'dired-goto-file'.
- bug#33871: 27.0.50; Revert Dired window saved in window configuration, (continued)
- bug#33871: 27.0.50; Revert Dired window saved in window configuration, Juri Linkov, 2022/02/15
- bug#33871: 27.0.50; Revert Dired window saved in window configuration, martin rudalics, 2022/02/16
- bug#33871: 27.0.50; Revert Dired window saved in window configuration, Juri Linkov, 2022/02/16
- bug#33871: 27.0.50; Revert Dired window saved in window configuration, martin rudalics, 2022/02/17
- bug#33871: 27.0.50; Revert Dired window saved in window configuration, Juri Linkov, 2022/02/17
- bug#33871: 27.0.50; Revert Dired window saved in window configuration, martin rudalics, 2022/02/19
- bug#33871: 27.0.50; Revert Dired window saved in window configuration, Juri Linkov, 2022/02/19
- bug#33871: 27.0.50; Revert Dired window saved in window configuration, martin rudalics, 2022/02/19
- bug#33871: 27.0.50; Revert Dired window saved in window configuration, Juri Linkov, 2022/02/20
- bug#33871: 27.0.50; Revert Dired window saved in window configuration, martin rudalics, 2022/02/21
- bug#33871: 27.0.50; Revert Dired window saved in window configuration,
Juri Linkov <=
- bug#33871: 27.0.50; Revert Dired window saved in window configuration, martin rudalics, 2022/02/23
- bug#33871: 27.0.50; Revert Dired window saved in window configuration, Juri Linkov, 2022/02/23
- bug#33871: 27.0.50; Revert Dired window saved in window configuration, martin rudalics, 2022/02/24