From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#9361: 24.0.50; default value of `dired-do-chmod' Date: Mon, 12 Sep 2011 14:49:23 +0300 Organization: JURTA Message-ID: <87mxea55u8.fsf@mail.jurta.org> References: <03BC028E352D4173B985B3B34DF3193A@us.oracle.com> <87zkiyabea.fsf@mail.jurta.org> <1BDADB23B4434E0C9330F1B010F1E1CE@us.oracle.com> <87bouqlptn.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1315829156 4396 80.91.229.12 (12 Sep 2011 12:05:56 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 12 Sep 2011 12:05:56 +0000 (UTC) Cc: 'Lars Magne Ingebrigtsen' , 9361@debbugs.gnu.org To: Chong Yidong Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Sep 12 14:05:51 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1R35Gp-0004Df-9Y for geb-bug-gnu-emacs@m.gmane.org; Mon, 12 Sep 2011 14:05:51 +0200 Original-Received: from localhost ([::1]:35132 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R35Go-000093-Q4 for geb-bug-gnu-emacs@m.gmane.org; Mon, 12 Sep 2011 08:05:50 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:42114) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R35Gk-00005W-DI for bug-gnu-emacs@gnu.org; Mon, 12 Sep 2011 08:05:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R35Gf-00047L-Vf for bug-gnu-emacs@gnu.org; Mon, 12 Sep 2011 08:05:46 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39289) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R35Gf-00047H-UA for bug-gnu-emacs@gnu.org; Mon, 12 Sep 2011 08:05:41 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1R35Ks-00020g-PW; Mon, 12 Sep 2011 08:10:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 12 Sep 2011 12:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9361 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Original-Received: via spool by 9361-submit@debbugs.gnu.org id=B9361.13158293877696 (code B ref 9361); Mon, 12 Sep 2011 12:10:02 +0000 Original-Received: (at 9361) by debbugs.gnu.org; 12 Sep 2011 12:09:47 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R35Ka-000201-0I for submit@debbugs.gnu.org; Mon, 12 Sep 2011 08:09:46 -0400 Original-Received: from smarty.dreamhost.com ([208.113.175.8]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R35KQ-0001zi-MA for 9361@debbugs.gnu.org; Mon, 12 Sep 2011 08:09:37 -0400 Original-Received: from ps18281.dreamhostps.com (ps18281.dreamhost.com [69.163.218.105]) by smarty.dreamhost.com (Postfix) with ESMTP id 4AA9A6E80A8; Mon, 12 Sep 2011 05:05:13 -0700 (PDT) Original-Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 075E7451C47C; Mon, 12 Sep 2011 05:05:11 -0700 (PDT) In-Reply-To: <87bouqlptn.fsf@stupidchicken.com> (Chong Yidong's message of "Sun, 11 Sep 2011 17:41:24 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (x86_64-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 12 Sep 2011 08:10:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:51061 Archived-At: > 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.