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

From: "Drew Adams" <[email-masked]>
Date: Thu, 20 Sep 2012 13:34:07 -0700

> I can use `debug' to invoke the debugger directly, which
> prevents such surprises.

1. Not if you put `debug' in `file-remote-p'.  Or in some function that then
calls `file-remote-p.  Or then calls some function that calls `file-remote-p'...

This is not about `debug-on-entry', AFAICT.  It is about the debugger debugging
anything that might call `file-remote-p'.

2. You are right to have underlined the fact that there are other, similar areas
that can be problematic for the debugger.  A user option that lets you list such
areas for the debugger to skip over could be useful.  IOW, mode line and other
redisplay would constitute one or more such optional list items.

3. But I also think that it should be enough, for this problematic mode line
enhancement, to simply call a duplicate of `file-remote-p' and not
`file-remote-p' itself, which is used by all kinds of code.

If that duplicate (e.g., `mode-line-file-remote-p') is called only by the
mode-line code then that should greatly reduce, if not eliminate, this problem
for the debugger.