emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: File > Close and File > Save


From: Drew Adams
Subject: RE: File > Close and File > Save
Date: Sun, 23 Mar 2008 22:57:01 -0700

> > 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 via email to

[Prev in Thread] Current Thread [Next in Thread]