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

From: Markus Triska <[email-masked]>
Date: Fri, 24 Oct 2008 16:06:17 +0200

martin rudalics <[email-masked]> writes:

> of windows' use_time so the value returned by `get-lru-window' is messy.
> use_time is updated by `select-window', hence a potential culprit is
> `walk-windows' which is used by `linum-mode'.

You are right that `get-lru-window' seems not to do the right thing in
effect (it evaluates to the currently selected window even though there
is another one in the frame). `select-window' seems not to be called in
`walk-windows' as used by linum though, since the third argument is not
a frame. 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. I do not yet know if/where use_time changes.