From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.devel Subject: Re: erase-buffer (was: with-output-to-temp-buffer) Date: Tue, 11 May 2004 20:14:25 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <20040511200503.605F.LEKTU@mi.madritel.es> References: <877jvjnl4g.fsf-monnier+emacs@gnu.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1084299582 25441 80.91.224.253 (11 May 2004 18:19:42 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 11 May 2004 18:19:42 +0000 (UTC) Cc: David Kastrup Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue May 11 20:19:29 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BNbqi-0005Oo-00 for ; Tue, 11 May 2004 20:19:28 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BNbqh-00020M-00 for ; Tue, 11 May 2004 20:19:28 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BNbos-0003nm-3u for emacs-devel@quimby.gnus.org; Tue, 11 May 2004 14:17:34 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.34) id 1BNbom-0003n3-Cy for emacs-devel@gnu.org; Tue, 11 May 2004 14:17:28 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.34) id 1BNbm9-0002s7-7A for emacs-devel@gnu.org; Tue, 11 May 2004 14:15:22 -0400 Original-Received: from [62.81.186.19] (helo=smtp09.retemail.es) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BNblr-0002Tp-AD; Tue, 11 May 2004 14:14:27 -0400 Original-Received: from [127.0.0.1] ([213.37.34.95]) by smtp09.retemail.es (InterMail vM.5.01.05.32 201-253-122-126-132-20030307) with ESMTP id <20040511181425.NKRI19890.smtp09.retemail.es@[127.0.0.1]>; Tue, 11 May 2004 20:14:25 +0200 Original-To: emacs-devel@gnu.org In-Reply-To: X-Mailer: Becky! ver. 2.09.01 [en] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:23165 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:23165 On 11 May 2004 17:32:36 +0200, David Kastrup wrote: > Stefan Monnier 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* RET". > 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. /L/e/k/t/u