unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#9361: 24.0.50; default value of `dired-do-chmod'
@ 2011-08-24 16:10 Drew Adams
  2011-08-24 18:45 ` Juri Linkov
  0 siblings, 1 reply; 19+ messages in thread
From: Drew Adams @ 2011-08-24 16:10 UTC (permalink / raw)
  To: 9361

This command was better before we added a default value (in Emacs 23).
 
For one thing, the default value is a bit confusing - it uses one of the
several possible syntaxes for `chmod' - the most verbose one, which
means the most editing.
 
For another thing, the default value comes from the current permissions
of the first file that is marked.  Privileging that file makes little or
no sense when there are multiple files marked.  A better value would
come from the _minimum_ permissions for each of u, g, o, among all the
files marked.  A different argument could be made that the permissions
of the current line should be used - to apply them without editing to
all of the marked files.
 
But even with such possible changes, I think it's a bad idea to provide
any default for this command.
 
For a third thing, if someone picks up that default value then more
editing is required than just starting from nothing.  It is a lot easier
to type `g-w' than it is to back up the right number of chars and edit
the `g=rw' (or whatever the current `g' permissions are) part of the
default value, to get the proper new absolute permissions value for `g'.
 
For a fourth thing, if the permissions are currently the same (for the
first file, which is privileged here), then `a=rw' (or whatever the
current permissions are) is a better default than `u=rw, g=rw, o=rw'.
For one thing it is quicker to read and manipulate.  For another, it
teaches users that they can use `a' as a shortcut.
 
The best approach is not to provide any default value here.  A user of
this Emacs command needs to know UNIX `chmod' anyway, and if known then
it is not hard to type the permissions from scratch.
 
If you really want to improve this, then let, say, `?' give some short
help about `chmod' - e.g. present an example.  But a default value is
not helpful here.
 

In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
 of 2011-08-22 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.5) --no-opt'
 






^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2012-01-27 16:58 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-24 16:10 bug#9361: 24.0.50; default value of `dired-do-chmod' Drew Adams
2011-08-24 18:45 ` Juri Linkov
2011-09-11  2:23   ` Lars Magne Ingebrigtsen
2011-09-11 15:00     ` Drew Adams
2011-09-11 21:41       ` Chong Yidong
2011-09-12 11:49         ` Juri Linkov
2011-09-12 20:47           ` Chong Yidong
2011-09-14 11:20             ` Juri Linkov
2011-09-14 15:07               ` Chong Yidong
2011-09-14 15:54                 ` Juri Linkov
2011-09-12 11:39       ` Juri Linkov
2011-09-12 14:45         ` Drew Adams
2012-01-26 16:27       ` Drew Adams
2012-01-27  1:38         ` Juri Linkov
2012-01-27  3:04           ` Drew Adams
2012-01-27  7:24         ` Chong Yidong
2012-01-27 12:09           ` Juri Linkov
2012-01-27 16:58             ` Drew Adams
2012-01-27 15:42           ` Drew Adams

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