GNU bug report logs -
#33871
27.0.50; Revert Dired window saved in window configuration
Previous Next
Reported by: Juri Linkov <juri <at> linkov.net>
Date: Tue, 25 Dec 2018 21:43:01 UTC
Severity: minor
Found in version 27.0.50
Fixed in version 30.0.50
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
Message #86 received at 33871 <at> debbugs.gnu.org (full text, mbox):
>>> 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'.
This bug report was last modified 1 year and 102 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.