emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: eval-last-sexp -> syntax error -> deletes rest of buffer!


From: David Reitter
Subject: Re: eval-last-sexp -> syntax error -> deletes rest of buffer!
Date: Sat, 4 Jun 2005 09:15:33 +0100

On 4 Jun 2005, at 02:41, Luc Teirlinck wrote:

You can get rid of the behavior you described by setting
eval-expression-debug-on-error to nil.  Unlike what I thought, the
default value of this variable is t, even in released versions.  I do
not know whether this is a very good idea.

The longer the expression that is evaluated, the greater the need is for eval-expression-debug-on-error, since you want to see where exactly the error occurred. (Alternatively, it would be nice to just show the error message, but set the point to the position of the error in the code.)

What's confusing is not the debug output. What's confusing is the narrowing. It occurs inconsistently, depending on some implementation specifics, and not directed by user needs. Some very specific expressions / syntax errors cause narrowing to happen.

Because the error occurred while the buffer was narrowed.  That only
applies to a minority of errors.  The narrowing was inside a
`save-excursion', which widens again _after_ an error.

OK. Then what should happen from a user perspective is that you either a) unroll changes before bringing up the debugger when they were not caused by the code being evaluated or b) just don't narrow the buffer when evaluating expressions. a) might be too complex to implement (safely at this time), but b) could be a little easier to do.

D




reply via email to

[Prev in Thread] Current Thread [Next in Thread]