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 14:28:04 +0200

> When you do:
 >
 >    $ emacs -Q -f linum-mode
 >
 > and then:
 >
 >    C-x 2
 >
 > you obtain one frame with two windows, the one on top being selected.
 >
 > When you then do:
 >
 >    M-: (switch-to-buffer-other-window "test") RET
 >
 > the selected window is unexpectedly reused to display the new buffer.

FWIW, the problem seems that `linum-mode' indirectly changes the value
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'.  Could you try to find out
whether my guess is correct and/or where and how use_time is set when
`linum-mode' is active?

Thanks, martin