unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Kevin Rodgers'" <kevin.d.rodgers@gmail.com>, <help-gnu-emacs@gnu.org>
Subject: RE: Emacs ignores modified state of "untitled" buffer
Date: Fri, 28 May 2010 10:18:12 -0700	[thread overview]
Message-ID: <95F4903F7E4B48DAA566AF099AB10B11@us.oracle.com> (raw)
In-Reply-To: <htok53$dlq$1@dough.gmane.org>

> > 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.





  reply	other threads:[~2010-05-28 17:18 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-19 14:52 Emacs ignores modified state of "untitled" buffer Stefan Vollmar
2010-05-19 15:04 ` Drew Adams
2010-05-19 20:34 ` Stephen Berman
2010-05-20 12:45 ` Kevin Rodgers
2010-05-20 13:29   ` Drew Adams
2010-05-20 14:00     ` Stefan Vollmar
2010-05-21  2:00       ` Kevin Rodgers
2010-05-21  2:06         ` Lennart Borgman
2010-05-21  1:56     ` Kevin Rodgers
2010-05-21  8:03       ` Stefan Vollmar
2010-05-21 13:17         ` Kevin Rodgers
2010-05-21 13:59           ` Stefan Vollmar
2010-05-21 14:11             ` Kevin Rodgers
2010-05-21 14:30               ` Stefan Vollmar
2010-05-21 17:15           ` Lennart Borgman
2010-05-21 20:49             ` Stefan Vollmar
2010-05-21 20:56               ` Lennart Borgman
2010-05-21 14:20       ` Drew Adams
2010-05-28 14:32         ` Kevin Rodgers
2010-05-28 17:18           ` Drew Adams [this message]
2010-05-28 21:21             ` Stefan Vollmar
     [not found]           ` <mailman.2.1275067137.32597.help-gnu-emacs@gnu.org>
2010-05-29  1:04             ` Tim X

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=95F4903F7E4B48DAA566AF099AB10B11@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=kevin.d.rodgers@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).