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


Message #8 received at 33871 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Juri Linkov <juri <at> linkov.net>, 33871 <at> debbugs.gnu.org
Subject: Re: bug#33871: 27.0.50;
 Revert Dired window saved in window configuration
Date: Wed, 26 Dec 2018 10:43:03 +0100
> Try to eval in emacs -Q in *scratch*:
>
> (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

You're obfuscating the underlying behavior with the 'dired-next-line'
and 'goto-char' calls but the final points are different without that.

Without your explicit moves, `dired' moves to the first file name in
the lower directory here.  So 'dired-move-to-filename' was called when
reverting the buffer and the 'set-window-configuration' "restores" the
lower window's point from the buffer's point because that window is
the selected one.  To confirm, try with the upper window selected
instead.

martin




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.