From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs Subject: bug#9361: 24.0.50; default value of `dired-do-chmod' Date: Wed, 24 Aug 2011 09:10:05 -0700 Message-ID: <03BC028E352D4173B985B3B34DF3193A@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1314202664 22930 80.91.229.12 (24 Aug 2011 16:17:44 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 24 Aug 2011 16:17:44 +0000 (UTC) To: 9361@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Aug 24 18:17:40 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 1QwG95-0004SC-RG for geb-bug-gnu-emacs@m.gmane.org; Wed, 24 Aug 2011 18:17:40 +0200 Original-Received: from localhost ([::1]:52232 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QwG95-0002Lx-3F for geb-bug-gnu-emacs@m.gmane.org; Wed, 24 Aug 2011 12:17:39 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:56029) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QwG90-0002Ju-Na for bug-gnu-emacs@gnu.org; Wed, 24 Aug 2011 12:17:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QwG8v-0002Nj-Vo for bug-gnu-emacs@gnu.org; Wed, 24 Aug 2011 12:17:34 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40762) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QwG8v-0002Nd-Ih for bug-gnu-emacs@gnu.org; Wed, 24 Aug 2011 12:17:29 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QwGBP-00008F-8E; Wed, 24 Aug 2011 12:20:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 24 Aug 2011 16:20:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 9361 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: Original-Received: via spool by submit@debbugs.gnu.org id=B.1314202801489 (code B ref -1); Wed, 24 Aug 2011 16:20:03 +0000 Original-Received: (at submit) by debbugs.gnu.org; 24 Aug 2011 16:20:01 +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 1QwGBM-00007o-K1 for submit@debbugs.gnu.org; Wed, 24 Aug 2011 12:20:00 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QwGBJ-00007V-0y for submit@debbugs.gnu.org; Wed, 24 Aug 2011 12:19:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QwG8a-00029X-Vz for submit@debbugs.gnu.org; Wed, 24 Aug 2011 12:17:23 -0400 Original-Received: from lists.gnu.org ([140.186.70.17]:57212) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QwG8a-00020f-Ic for submit@debbugs.gnu.org; Wed, 24 Aug 2011 12:17:08 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:52046) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QwG23-0007Pu-Kt for bug-gnu-emacs@gnu.org; Wed, 24 Aug 2011 12:10:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QwG22-0000aq-JS for bug-gnu-emacs@gnu.org; Wed, 24 Aug 2011 12:10:23 -0400 Original-Received: from rcsinet15.oracle.com ([148.87.113.117]:33439) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QwG22-0000ak-E9 for bug-gnu-emacs@gnu.org; Wed, 24 Aug 2011 12:10:22 -0400 Original-Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by rcsinet15.oracle.com (Switch-3.4.4/Switch-3.4.4) with ESMTP id p7OGACiq017862 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 24 Aug 2011 16:10:14 GMT Original-Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id p7OGABOh005583 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 24 Aug 2011 16:10:12 GMT Original-Received: from abhmt118.oracle.com (abhmt118.oracle.com [141.146.116.70]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p7OGA6cS002549 for ; Wed, 24 Aug 2011 11:10:06 -0500 Original-Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 24 Aug 2011 09:10:06 -0700 X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcxieEmrywkmw46jTr2e5NhFe7Aaew== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6109 X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090206.4E552266.005E:SCFMA922111,ss=1,re=-4.000,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Wed, 24 Aug 2011 12:20:03 -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:50291 Archived-At: 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'