Subject: bug#13007: 24.3.50; emacs_backtrace.txt

From: Stefan Monnier <[email-masked]>
Date: Thu, 29 Nov 2012 14:14:13 -0500

FWIW, it's normal for current-buffer to be different from (window-buffer
(selected-window)).  That happens all the time in Elisp (e.g. whenever
you use `set-buffer').

So if a piece of code needs the two to be "in sync" that code needs to
sync-them-up by hand.  Otherwise, it's better not to assume that the two
are related.

This is quite different from the issue of (selected-window) -vs-
(frame-selected-window) where this is (almost) always equal and that
equality can't be broken by Elisp code.

        Stefan