GNU bug report logs - #33458
27.0.50; dired loses position when reverted from outside place

Previous Next

Package: emacs;

Reported by: v88m <at> posteo.net

Date: Wed, 21 Nov 2018 20:46:01 UTC

Severity: minor

Found in version 27.0.50

Fixed in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

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: martin rudalics <rudalics <at> gmx.at>
Cc: 33458 <at> debbugs.gnu.org
Subject: bug#33458: 27.0.50; dired loses position when reverted from outside place
Date: Tue, 25 Dec 2018 23:25:41 +0200
>> Thanks, but I expected it to be more configurable, i.e. to also look
>> at prev/next-buffers in a saved configuration when needed, etc.
>
> We can easily do that.  But note that a window's previous and next
> buffers are stored in the window itself (where, if the window is live,
> they can change at any time) and not in the window copy stored in the
> configuration.

Oh, I see now why this case fails:

(let ((_ (view-emacs-todo))
      (w-c (current-window-configuration)))
  (view-emacs-news)
  (set-window-configuration w-c)
  (previous-buffer))

I expected it not to change prev/next buffers of the window
saved in the window configuration, so the expectation for the
last call to 'previous-buffer' was to return from the TODO buffer
to the original buffer *scratch*.  But since the NEWS buffer
meddled with the same window, this is not the case.

This is why any code that saves window configurations has to care
about creating a new window after the current-window-configuration
call (thus removing the window saved in the window configuration),
like I fixed now in https://gitlab.com/link0ff/emacs-wincows/commit/226cf229

>> This could be achieved with a complete export of the saved
>> configuration to a Lisp structure.
>
> It's a bit tedious to code but can be certainly done.  But I suppose
> that what might then interest you just as well is to transform window
> states into window configurations ;-)

Indeed, this would simplify many things.




This bug report was last modified 4 years and 330 days ago.

Previous Next


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