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: Markus Triska <triska <at> metalevel.at>, 33871 <at> debbugs.gnu.org
Subject: bug#33871: 27.0.50; Revert Dired window saved in window configuration
Date: Sat, 29 Dec 2018 19:18:53 +0100
> In the cases I faced, I found it a drawback that the current buffer is
> treated differently than the others by current-window-configuration:

I'm not sure what precisely you mean here.  'save-window-excursion'
saves and restores the current buffer so that the restored state
replicates the saved state as closely as possible.  Hence, the buffer
current when the old configuration was saved should be also current
after the old configuration has been restored, regardless of whether
it is the buffer assigned to any of the selected windows.

If you allude to the

  As a special exception, the window
  configuration does not record the value of point in the selected window
  for the current buffer.

then this behavior is provided for historical reasons AFAICT.  Most
applications using a window excursion probably did not like the cursor
jump back to the old location.

> Suppose it did not make such an exception. Then it would be quite easy
> to manually implement exceptional behaviour for the current buffer. But
> the converse is not so easy: It is harder to manually obtain the desired
> behaviour if we *want* the current buffer to be treated like the others,
> when the function already treats it differently. If it didn't, then a
> simple save-excursion, or a similar mechanisms, around restoring the
> window configuration could ostensibly restore the state for all buffers
> except the current one, resulting in the same behaviour that we get now.
> At least that was my impression when using window configurations.

It depends on what you want to handle manually.  Note that if you do
not save any additional information separately, a window configuration
by itself does not give you any clue as to which buffer was current or
which window was selected at the time it was saved.

What we could do is to give 'set-window-configuration' an additional
argument which, for example, would allow to restore the selected
window's point to its saved position.

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.