From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.devel Subject: Re: erase-buffer (was: with-output-to-temp-buffer) Date: Tue, 11 May 2004 10:22:10 -0600 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <40A0FDB2.8010001@yahoo.com> References: <20040429.150303.42778779.wl@gnu.org> <200404300142.KAA01027@etlken.m17n.org> <87u0z1puxa.fsf@mail.jurta.org> <200404301326.WAA02744@etlken.m17n.org> <8765bga5tt.fsf@mail.jurta.org> <200405020157.KAA07108@etlken.m17n.org> <200405060505.OAA21188@etlken.m17n.org> <200405061310.WAA22378@etlken.m17n.org> <200405101213.VAA04125@etlken.m17n.org> <87ekpsuzqa.fsf-monnier+emacs@gnu.org> <877jvjnl4g.fsf-monnier+emacs@gnu.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1084303641 3656 80.91.224.253 (11 May 2004 19:27:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 11 May 2004 19:27:21 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue May 11 21:27:14 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 1BNcuI-00029K-00 for ; Tue, 11 May 2004 21:27:14 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BNcuH-0003Iq-00 for ; Tue, 11 May 2004 21:27:13 +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 1BNcqw-0008QO-V4 for emacs-devel@quimby.gnus.org; Tue, 11 May 2004 15:23:47 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.34) id 1BNcqq-0008P5-8z for emacs-devel@gnu.org; Tue, 11 May 2004 15:23:40 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.34) id 1BNcqG-0008Gg-O4 for emacs-devel@gnu.org; Tue, 11 May 2004 15:23:37 -0400 Original-Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1BNcqG-0008GE-5V for emacs-devel@gnu.org; Tue, 11 May 2004 15:23:04 -0400 Original-Received: from [80.91.224.249] (helo=main.gmane.org) by mx20.gnu.org with esmtp (Exim 4.34) id 1BNa4t-0005jI-Pq for emacs-devel@gnu.org; Tue, 11 May 2004 12:26:04 -0400 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1BNa1B-0006tN-00 for ; Tue, 11 May 2004 18:22:09 +0200 Original-Received: from 170.207.51.80 ([170.207.51.80]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 11 May 2004 18:22:09 +0200 Original-Received: from ihs_4664 by 170.207.51.80 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 11 May 2004 18:22:09 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 44 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 170.207.51.80 User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2 X-Accept-Language: en-us 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:23171 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:23171 David Kastrup wrote: > Stefan Monnier writes: >>BTW, it seems the main problem has to do with a conflict between >>erase-buffer when called interactively and erase-buffer when called >>from packages. >> >>So my question is: why is erase-buffer a command? >>I didn't know it was a command until 5 days ago, it is not bound to any >>key, 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. Wrong. I use it all the time. >>Actually the only case I can think of is when the user knows what >>he's doing; and allowing the M-x erase-buffer to work in Custom >>buffers would then still make perfect sense (even if we don't fix >>the lingering overlays). > > If one wants to use a command like that, one can always say > M-: (erase-buffer) RET Yuck. > I also think that it should not be a command. If you need to erase a > buffer for whatever obscure reason, you can clear it with > M-h C-w I use M-x erase-buffer specifically to avoid munging the kill ring. erase-buffer's (interactive "*") spec will continue to protect users who call it interactively in a read-only buffer. The suggestion that erase-buffer bind inhibit-read-only to (not buffer-read-only) would not affect its interactive use or Lisp function calls in read only buffers, but would allow it to do its job when there are read-only text properties or overlays. I never use M-x customize and don't want it to determine M-x erase-buffer's fate. -- Kevin Rodgers