GNU bug report logs - #1237
23.0.60; `switch-to-buffer-other-window' sometimes uses selected window

Previous Next

Package: emacs;

Reported by: Markus Triska <markus.triska <at> gmx.at>

Date: Fri, 24 Oct 2008 10:35:03 UTC

Severity: normal

Done: martin rudalics <rudalics <at> gmx.at>

Bug is archived. No further changes may be made.

Full log


Message #45 received at 1237 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Markus Triska <markus.triska <at> gmx.at>
Cc: 1237 <at> debbugs.gnu.org
Subject: Re: bug#1237: 23.0.60;	`switch-to-buffer-other-window' sometimes
 uses selected window
Date: Sat, 25 Oct 2008 19:00:39 +0200
> Would it suffice if `run_window_configuration_change_hook' re-selected
> the selected window at the end? i.e.,

It should handle your two windows case.  I'm not sure what happens with
three or more windows.  The problem is that we want the _least_ recently
used window and the `select-window' would not fix anything messed up
down there.  In some sense this virtual list of windows ordered by their
use_time gets rotated with every call of `walk-windows'.

The real problem is the unholy combination of
run_window_configuration_change_hook and `walk-windows'.  The former
carefully selects each window _without_ recording it and the latter
annihilates the former's efforts by selecting the window _and_ recording
it.  I tried with a `save-selected-window-norecord' macro and equipped
`set-frame-selected-window' with an extra "norecord" parameter.  This
works but is quite clumsy.  Also, I'm by no means sure whether the
effect of recorded selecting a window within `walk-windows' might have
been considered a feature by other callers.

martin





This bug report was last modified 16 years and 207 days ago.

Previous Next


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