Subject: bug#1237: 23.0.60; `switch-to-buffer-other-window' sometimes uses selected window

From: martin rudalics <[email-masked]>
Date: Fri, 24 Oct 2008 16:45:53 +0200

> I found that when you set `window-configuration-change-hook' to
 > nil in *scratch* before `switch-to-buffer-other-window', it chooses the
 > right buffer.

Does it change anything when you remove the `walk-windows' from your
function?  Then we would know that `walk-windows' is responsible for
triggering it.  Maybe run_window_configuration_change_hook messes it up
after `walk-windows'.

 > I do not yet know if/where use_time changes.

Could you try to run this with GDB, set a breakpoint in select_window at
the

       XSETFASTINT (w->use_time, window_select_count);

line, and get a backtrace when(ever) this is hit for the lower window?

martin