GNU bug report logs - #33871
27.0.50; Revert Dired window saved in window configuration

Previous Next

Package: emacs;

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

From: martin rudalics <rudalics <at> gmx.at>
To: Juri Linkov <juri <at> linkov.net>
Cc: 33871 <at> debbugs.gnu.org, Lars Ingebrigtsen <larsi <at> gnus.org>
Subject: bug#33871: 27.0.50; Revert Dired window saved in window configuration
Date: Thu, 24 Feb 2022 10:19:17 +0100
> 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)'.

But you can easily write a function to inspect a window state.

> 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.

We obviously then should strive for a solution that stores any kind of
information via a hook in an alist of entries, one for each window in a
buffer local way, and one global entry for the frame itself.

martin




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.