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
View this message in rfc822 format
>> 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.
>
> As a first step we could try to do that for window states.
But window states don't contain pointers to windows.
So it's impossible to find e.g. '(selected-window)'
in a window state returned by '(window-state-get)'.
> (Note in this context: We traditionally say in the Elisp manual that "As
> a special exception, the window configuration does not record the value
> of point in the selected window for the current buffer." which is not
> precise IIUC. It does record the value but 'set-window-configuration'
> does not or not necessarily restore it.)
Then we could save additional context information the same way as
currently this special exceptional value of point is saved, e.g.
in 'tab-bar--tab':
(wc . ,(current-window-configuration))
(wc-point . ,(point-marker))
where 'point-marker' is saved separately from 'current-window-configuration'.
And then it's restored in 'tab-bar-select-tab':
;; set-window-configuration does not restore the value of
;; point in the current buffer, so restore it separately.
(when (and (markerp wc-point)
(marker-buffer wc-point)
;; FIXME: After dired-revert, marker relocates to 1.
;; window-configuration restores point to global point
;; in this dired buffer, not to its window point,
;; but this is slightly better than 1.
;; Maybe better to save dired-filename in each window?
(not (eq 1 (marker-position wc-point))))
(goto-char wc-point))
Please note that this bug report is related to FIXME above.
So a possible solution is also to save more context information
like dired-filename, and then restore it using dired-goto-file.
This bug report was last modified 1 year and 101 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.