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 #40 received at 1237 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Markus Triska <markus.triska <at> gmx.at>
To: martin rudalics <rudalics <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 18:09:28 +0200
martin rudalics <rudalics <at> gmx.at> writes:

> 		(set-frame-selected-window (car elt) (cdr elt)))) ; <--- here
> 	 (if (window-live-p save-selected-window-window)
> 	     (select-window save-selected-window-window)))))) <--- and here
>
> Fixing these two fixes the bug.  I have to find out how to do this in an
> unobtrusive way though.

Would it suffice if `run_window_configuration_change_hook' re-selected
the selected window at the end? i.e.,

2008-10-25  Markus Triska  <markus.triska <at> gmx.at>

	* window.c (run_window_configuration_change_hook): Re-select the
	selected window, to get the most recently used window right.

diff --git a/src/window.c b/src/window.c
index 5931955..28e089a 100644
--- a/src/window.c
+++ b/src/window.c
@@ -3382,6 +3382,9 @@ run_window_configuration_change_hook (struct frame *f)
       }
   }
 
+  /* Make sure that the selected window remains most recently used. */
+  Fselect_window (Fselected_window (), Qnil);
+
   run_funs (global_wcch);
   unbind_to (count, Qnil);
 }




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.