unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Eli Zaretskii'" <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: RE: File > Close and File > Save
Date: Sun, 23 Mar 2008 22:57:01 -0700	[thread overview]
Message-ID: <000001c88d73$e1a82df0$0600a8c0@us.oracle.com> (raw)
In-Reply-To: <uprtkg3id.fsf@gnu.org>

> > 1. The File > Close menu item is unclear. In fact, this is 
> > essentially kill-buffer, but you would never guess that.
> 
> I think the tooltip for this menu item hints on that.

Tooltips are fine, but their existence is not a reason not to get the menu items
right. Tooltips are extra information; they are not a substitute for good menu
names.

> > And there is no key binding shown.
> > Menus are one way to learn what commands are available and 
> > what keys they are
> > bound to. This item should teach C-x k.
> 
> Emacs does this automatically, but the problem here is that the
> File->Close menu item does not run kill-buffer, the command usually
> bound to C-x k.  It runs a different command.

Yes, I know that. That's no excuse. Emacs has :key for this purpose. The point
is to let the menu teach the key bindings. It makes sense to hint that you can
kill the buffer with `C-x k'.

> > The menu item should be renamed and C-x k should be put 
> > next to the item. What
> > name should be used? Well, how about `Kill Buffer'?
> 
> File->Close is a standard menu item in most, if not all, applications
> that visit files.  For that reason, I object to renaming this menu
> item in Emacs.

Emacs doesn't just visit files. Close doesn't only mean toss a file.

No connection between killing a buffer and Close is made anywhere in the doc or
doc strings. File > Close is an orphan adrift on a raft. The tooltip is its only
lifeline, and `C-h k' is its only anchor.

> > 2. In a related vein, we have item `Revert Buffer', but 
> > just `Save' and `Save As'. Every other item on the File menu
> > has a verb and object. How about `Save
> > Buffer' and `Save Buffer As', for consistency and clarity?
> 
> I'd prefer to remove "buffer" from "Revert buffer", if we are obsessed
> with consistency.  Again, because "Save" and "Save As" are standard
> items on the File menu in GUI applications that visit files.

Files are not the only things you can save in Emacs. We have Save Options, Save
Bookmarks [As], Save Dictionary,...

It's about clarity, not obsessive or even consistent consistency. Revert Buffer
is clearer than Revert. Save Buffer is clearer than Save. Exit Emacs is clearer
than Exit. Kill Buffer (or even Close Buffer) is clearer than Close.

But I won't belabor it. If resistence is at a point where not adding a
key-binding hint for something as important as killing a buffer is defended in
terms of that not happening automatically because `kill-this-buffer' is not
exactly `kill-buffer' ("not my fault"), then we are in the realm of mauvaise foi
and there is no hope of prying eyes open. 

The point of the mail and the cited essay was to encourage a second look at the
menu. But the ground hog sees its shadow and returns to its burrow for another
few years... A long winter indeed.






  reply	other threads:[~2008-03-24  5:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-23 22:42 File > Close and File > Save Drew Adams
2008-03-24  0:13 ` Jason Rumney
2008-03-24  4:16 ` Eli Zaretskii
2008-03-24  5:57   ` Drew Adams [this message]
2008-03-24 10:57     ` Jason Rumney
2008-03-24 16:50       ` David Reitter
2008-03-24 16:59         ` Lennart Borgman (gmail)

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='000001c88d73$e1a82df0$0600a8c0@us.oracle.com' \
    --to=drew.adams@oracle.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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