Subject: Re: bug#8789: 23.3; debug backtrace buffer changes window on step-through

From: Stefan Monnier <[email-masked]>
Date: Thu, 20 Sep 2012 18:15:30 -0400

> But how about an option that does that only for eval when the debugger is
> active?  IOW, that sounds like something that is a broader brush than what is
> needed here.

There are 2 different situations:
1- calling the debugger while it's already active.  This can easily be
   avoided by checking inhibit-debugger.  `debug-on-error' already does that,
   and it would probably make sense to make debug-on-entry do it as well.
2- calling the debugger from a function that's called all the time.
   I think in the file-remote-p case, we'll hit this one, which means that
   every time you exit the debugger you'll get right back into it.
   Emacs is not rendered unusable, but if you're trying to debug an
   unrelated call to that function, you're out of luck.

Number 2 can be solved by making the breakpoint conditional on some
predicate which might check the backtrace to determine the context of
the call.

        Stefan