Subject: Re: bug#17882: 24.3; *Backtrace* buffer appearing in the wrong frame

From: Michael Heerdegen <[email-masked]>
Date: Mon, 30 Jun 2014 18:00:26 +0200

Toomas Rosin <[email-masked]> writes:

> > What you see is probably an annoying consequence of the related fix.
> > I suggest to make a bug report.

Thanks, Toomas.

I think the debugger is now too strict about reusing the last used
window.  `debug` prefers the remembered `debugger-previous-window`.
AFAIK, this variable is never unset, so the debugger tries to reuse the
last used window even when the last debugging session was over for
hours.  This is a problem when that window is still existing, but not
"reachable" (say, on another display).

This is the relevant code in `debug`:

  (pop-to-buffer
   debugger-buffer
   `((display-buffer-reuse-window
      display-buffer-in-previous-window)
     . (,(when debugger-previous-window
           `(previous-window . ,debugger-previous-window)))))

Should we add a test whether `debugger-previous-window`s frame fulfills
(lambda (frame) (eq t (frame-visible-p frame))) ?

Thanks,

Michael.