From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: Emacs ignores modified state of "untitled" buffer Date: Fri, 28 May 2010 10:18:12 -0700 Message-ID: <95F4903F7E4B48DAA566AF099AB10B11@us.oracle.com> References: <51707DDA-8D52-4D9F-9FD4-461987F2DEDE@nf.mpg.de> <8E1EF5747B7A4183A0873F02FDBBF398@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1275067177 21704 80.91.229.12 (28 May 2010 17:19:37 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 28 May 2010 17:19:37 +0000 (UTC) To: "'Kevin Rodgers'" , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri May 28 19:19:35 2010 connect(): No such file or directory Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OI3DZ-0004Vc-P7 for geh-help-gnu-emacs@m.gmane.org; Fri, 28 May 2010 19:19:34 +0200 Original-Received: from localhost ([127.0.0.1]:57279 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OI3DZ-0000uq-3Q for geh-help-gnu-emacs@m.gmane.org; Fri, 28 May 2010 13:19:33 -0400 Original-Received: from [140.186.70.92] (port=39006 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OI3Ct-0000tH-Fm for help-gnu-emacs@gnu.org; Fri, 28 May 2010 13:18:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OI3Cs-0004Ow-5A for help-gnu-emacs@gnu.org; Fri, 28 May 2010 13:18:51 -0400 Original-Received: from rcsinet10.oracle.com ([148.87.113.121]:33529) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OI3Cr-0004Or-Vy for help-gnu-emacs@gnu.org; Fri, 28 May 2010 13:18:50 -0400 Original-Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o4SHIjWn030568 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 28 May 2010 17:18:47 GMT Original-Received: from acsmt355.oracle.com (acsmt355.oracle.com [141.146.40.155]) by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o4SHIhRJ027383; Fri, 28 May 2010 17:18:43 GMT Original-Received: from abhmt002.oracle.com by acsmt354.oracle.com with ESMTP id 277985391275067080; Fri, 28 May 2010 10:18:00 -0700 Original-Received: from dradamslap1 (/141.144.64.141) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 28 May 2010 10:18:00 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: Acr+cpfMdIBmwPB6T/edoGZRtTGqaQAA0Elw X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5931 X-Auth-Type: Internal IP X-Source-IP: acsinet15.oracle.com [141.146.126.227] X-CT-RefId: str=0001.0A090206.4BFFFAF7.0126:SCFMA922111,ss=1,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:73785 Archived-At: > > You've offered this as command `switch-to-new-buffer' and > > put it on the `Buffers' menu as `Select New Buffer'. > > > > I would prefer that it be considered an improved behavior > > for `Visit New File', which is currently just `find-file'. > > The use of your command is, I think, for new file buffers > > only, so that intention should be reflected in both the command > > name and menu-item name. The `Buffers' menu is the wrong > > place for this, IMO. > > > > So I would suggest changing the command name to something > > like `new-file' or `visit-new-file' and (more importantly) > > replacing the `File' > `Visit New File' menu item with it. > > The term "visit" has a very specific meaning in Emacs, and > switch-to-new-buffer doesn't actually visit a file > (buffer-file-name is nil). I would prefer a name > like open-new-file, defined an alias for switch-to-new-buffer. OK by me. But if you keep the original name also, I'd suggest modifying it to `switch-to-new-file-buffer'. It is a buffer intended for a new file; it is not just a new buffer. `open' is not really clearer here than `visit', but it is less specific. It is true that in Emacs we speak of "visiting" a file as reading its content into a buffer. Whether `buffer-file-name' is nil at that moment, so the buffer is not actually visiting a file yet, is less important than the purpose (use) of the command, which is to create a buffer that will be associated with a new file. The buffer switched to is intended for visiting a file, even if that file does not yet exist. > It seems to me the File menu entries are named backwards: > "Visit New File" should be "Open New File", "Open File..." > should be "Visit File...", and "Open Directory..." should be > "Visit Directory..." IMO, `Open' in a menu item is OK for both existing and new. But you are correct that in Emacs jargon the more correct term for an existing file would be `Visit'. I would propose (and have proposed ;-)) simply `New File' as the menu item. It is common nowadays to have a menu item `New' for creation when the object to be created is clear, and `New Foo' to make clear that it creates a foo object. (I use `New File' and `New Directory' in my own code, `menu-bar+.el'.) Whether we use `Visit' or `Open' for an existing whatever is not so important. What is important is to clearly distinguish the case of creation (`New'). > > Those who are most likely to use such a menu item are > > newbies who expect that behavior. Any Emacs veteran who prefers > > `find-file' will not be likely to use the menu and choose > > `Visit New File'. And it is clear what a `new-file' command is for. > > > > I agree with Lennart that you should think about proposing > > this to emacs-devel. I would support it, especially with the > > changes I just mentioned. > > OK, we'll see how it goes.