GNU bug report logs - #9361
24.0.50; default value of `dired-do-chmod'

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Wed, 24 Aug 2011 16:20:03 UTC

Severity: minor

Tags: notabug

Found in version 24.0.50

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Juri Linkov <juri <at> jurta.org>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: 'Lars Magne Ingebrigtsen' <larsi <at> gnus.org>, 9361 <at> debbugs.gnu.org, Drew Adams <drew.adams <at> oracle.com>
Subject: bug#9361: 24.0.50; default value of `dired-do-chmod'
Date: Mon, 12 Sep 2011 14:49:23 +0300
> I think there's a problem here, indeed.  It's a bad idea to take an
> empty input to mean a certain default permission---especially when that
> default permission is not displayed in the prompt.
>
> The following patch makes dired-do-chmod demand a non-empty input.  The
> precomputed permission is still available in the M-n `future history'.

There are other demands that dired commands should not use `read-string'
that returns the default value for an empty input.  Please see
http://lists.gnu.org/archive/html/emacs-devel/2011-07/msg01200.html

So we should either change `read-string' (backward-incompatible change)
or to change `dired-mark-read-string' not to use `read-string'.

Another solution is to add a new global variable that changes the default
behavior of `read-string' and let-bind it in `dired-mark-read-string'.

> +     (while (equal result "")
> +       (setq result
> + 	    (read-from-minibuffer prompt nil nil
> + 				  nil nil default)))

I think it should tell the user what's wrong, like `read-number' does
with "Please enter a number."

Too bad that currently semantically similar functions
`read-string' and `read-number' differ significantly
WRT handling an empty input and default values.




This bug report was last modified 13 years and 177 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.