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: Juri Linkov <juri <at> linkov.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 33871 <at> debbugs.gnu.org
Subject: bug#33871: 27.0.50; Revert Dired window saved in window configuration
Date: Sun, 13 Feb 2022 20:40:16 +0200
>> (progn (dired "/tmp") (dired-next-line 1)
>>        (split-window) (other-window 1)
>>        (dired "/tmp") (dired-next-line 2)
>>        (let ((w-c (current-window-configuration))
>> 	     (p-m (point-marker)))
>> 	 (view-emacs-todo) (delete-other-windows)
>> 	 (with-current-buffer (get-buffer "tmp")
>> 	   (revert-buffer))
>> 	 (set-window-configuration w-c)
>> 	 (goto-char p-m)))
>>
>> Result:
>> - point in the selected Dired window moves to point-min
>> - point in the non-selected Dired window moves to point-max
>
> I tried this in Emacs 29, and point was point-min in both windows.  But
> I'm not sure where point should end up after this code, really 😀, so is
> this working as expected now?

It should end up where it was initially, i.e. on file names in Dired.
But this can achieved only by implementing context-aware markers,
such as used by the package saveplace.el, e.g.:

  ((window-configuration-1
     ((dired-window-1 . `(lambda () (dired-goto-file ,(dired-get-filename))))))
   (window-configuration-2 ...)
   ...)




This bug report was last modified 1 year and 103 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.