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: Fri, 3 Jun 2005 21:19:33 +0100

On 3 Jun 2005, at 09:01, Richard Stallman wrote:

Set the point right after the (malformed) expression and hit C- x C-e.
    You will find that an error is correctly reported (invalid-read-
    syntax ")"), but that the complete rest of the buffer (after the
    point) IS DELETED.

    Annoyingly, undo doesn't bring it back, nor is the deleted part of
    the buffer  properly killed and put into the killring.

The text has not been killed.
The buffer is only narrowed temporarily.

Seems to me like half of my buffer has gone to Nirvana. How do I get it back? That's not obvious from the info description of eval-last- sexp, and I don't understand why it would go away like that. I found out thanks to your tip and a search in the manual: C-x n w.

But why is the buffer narrowed "temporarily" just when I have this kind of syntax error, but not when there's other kinds? I've been doing thousands of C-x C-e over last last couple of months, and the buffer is just "narrowed temporarily" in this particular situation.

At least the manual should document it (in eval-last-sexp and wherever it's done) and explain when exactly the buffer is narrowed.




reply via email to

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