[Top][All Lists]

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

Re: erase-buffer (was: with-output-to-temp-buffer)

From: Juanma Barranquero
Subject: Re: erase-buffer (was: with-output-to-temp-buffer)
Date: Tue, 11 May 2004 20:14:25 +0200

On 11 May 2004 17:32:36 +0200, David Kastrup <address@hidden> wrote:

> Stefan Monnier <address@hidden> writes:

> > and I can't think of any circumstance where a user might want to say
> > M-x erase-buffer RET.
> Right.  At best you want to kill a buffer.

Actually, I use M-x erase-buffer quite frequently (though I'm not
suicidal enough to bind it to a key).

I happen to like to always have a *scratch* buffer around. I use it just
for that, scratch: putting away notes for a while, or as a temporary
buffer for cut&paste, etc. (the advantage is that in my setup, Emacs
warns me if I try to exit it with a non-empty *scratch*). I even have
key combinations to switch from any buffer to *scrach* (it saves the
selected buffer) and back, because I do it so frequently.

So I often do M-x erase-buffer to reset it to a clean state. It's easier
(to me, anyway) typing "M-x era TAB RET" than "C-x k RET C-x b *scratch*

> If you need to erase a
> buffer for whatever obscure reason, you can clear it with
> M-h C-w

You mean C-x h C-w :)

> But even there, you
> would want to have it remove things like read-only prompt strings.

On that, I agree: you do erase-buffer (in a non-readonly buffer), you
get an empty buffer. Any other result would seem ilogical.


reply via email to

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