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

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

I constructed the following self-contained case that I hope helps you:

   (defun my-walk () (walk-windows 'identity))

   (add-hook 'window-configuration-change-hook 'my-walk nil t)

   (split-window)

   (switch-to-buffer-other-window "test")

If you put these forms in the *scratch* buffer of "emacs -Q" and then
evaluate them one after another, you should be able to see the problem.
The problem does not occur if the hook is NOT made buffer-local.