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#10624: 24.0.92; default value of `dired-do-ch*' Date: Fri, 27 Jan 2012 07:35:52 -0800 Message-ID: <0F10A2A4C6E541469381BA91CB8AEEB3@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 1327678603 27249 80.91.229.12 (27 Jan 2012 15:36:43 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 27 Jan 2012 15:36:43 +0000 (UTC) To: 10624@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jan 27 16:36:39 2012 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 1Rqnqw-0001OY-Gp for geb-bug-gnu-emacs@m.gmane.org; Fri, 27 Jan 2012 16:36:38 +0100 Original-Received: from localhost ([::1]:44293 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rqnqw-00035H-32 for geb-bug-gnu-emacs@m.gmane.org; Fri, 27 Jan 2012 10:36:38 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:55906) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rqnqm-00034g-Ao for bug-gnu-emacs@gnu.org; Fri, 27 Jan 2012 10:36:36 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rqnqi-00066U-4T for bug-gnu-emacs@gnu.org; Fri, 27 Jan 2012 10:36:28 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:41524) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rqnqi-00066J-2t for bug-gnu-emacs@gnu.org; Fri, 27 Jan 2012 10:36:24 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1RqnrJ-0005YL-TV for bug-gnu-emacs@gnu.org; Fri, 27 Jan 2012 10:37:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 27 Jan 2012 15:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 10624 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: Original-Received: via spool by submit@debbugs.gnu.org id=B.132767861921335 (code B ref -1); Fri, 27 Jan 2012 15:37:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 27 Jan 2012 15:36:59 +0000 Original-Received: from localhost ([127.0.0.1]:46911 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RqnrG-0005Y3-Ef for submit@debbugs.gnu.org; Fri, 27 Jan 2012 10:36:58 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:42861) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RqnrD-0005Xq-ON for submit@debbugs.gnu.org; Fri, 27 Jan 2012 10:36:57 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RqnqQ-00065c-KZ for submit@debbugs.gnu.org; Fri, 27 Jan 2012 10:36:12 -0500 Original-Received: from lists.gnu.org ([140.186.70.17]:54211) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RqnqQ-00065Y-J2 for submit@debbugs.gnu.org; Fri, 27 Jan 2012 10:36:06 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:55867) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RqnqK-00032H-O5 for bug-gnu-emacs@gnu.org; Fri, 27 Jan 2012 10:36:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RqnqJ-000659-2A for bug-gnu-emacs@gnu.org; Fri, 27 Jan 2012 10:36:00 -0500 Original-Received: from rcsinet15.oracle.com ([148.87.113.117]:31864) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RqnqI-000654-Su for bug-gnu-emacs@gnu.org; Fri, 27 Jan 2012 10:35:59 -0500 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 q0RFZufC007618 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 27 Jan 2012 15:35:57 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 q0RFZuSv011742 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 27 Jan 2012 15:35:56 GMT Original-Received: from abhmt108.oracle.com (abhmt108.oracle.com [141.146.116.60]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q0RFZuqX019921 for ; Fri, 27 Jan 2012 09:35:56 -0600 Original-Received: from dradamslap1 (/10.159.35.238) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 27 Jan 2012 07:35:55 -0800 X-Mailer: Microsoft Office Outlook 11 Thread-Index: AczdCVo2rblNt82LRBGiBBT5l+fi7g== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090208.4F22C45D.0082,ss=1,re=0.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.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:56084 Archived-At: When multiple files are marked, the default value for `dired-do-chmod' is taken from the permissions of the first of the marked files. a. This is not helpful - why the first marked and not the last or the 23rd? b. This is not clear - we don't let the user know which file the default permissions correspond to. (Not even any doc.) An *immediate* fix would be one of these alternative approaches: 1. Do not provide any default value at all. (Easiest to do, but least helpful improvement.) 2. Use the permissions of the current file (cursor location) as default, instead of the first marked file. And document this. This lets users easily control which permissions are copied. I prefer #2, but #1 is at least better than the current situation. This bug report is a followup to bug #9361, which was diverted and never addressed. Here is the point (quoted from #9361, where it was ignored): > If we are going to copy settings from a particular file in order to > make them available for, essentially, pasting operations to other > files, then the target file being copied from should be clear. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > The copy operation should be an explicit user choice, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > not something implicit, based only on the first marked file (why > not the last? or the 23rd?). But again, #1 and #2 are only immediate, remedial, partial fixes. They are not the best approach. A better fix is to do the following (and yes, this IS part of this report, as an enhancement request): 3. Create a separate command to copy the settings (including the permissions) from a particular file that the user can choose - e.g., the current (cursor line) file. 4. Use those copied settings as the basis for the default values of _all_ of the Dired `ch*' commands (`dired-do-chmod', `dired-do-chgrp', etc.). For each such command, use only the relevant part of the copied data. A single key would copy all of the displayed field info. Only the appropriate parts of that copied info would be used for the different default values of the various application/modifying commands. 5. In the case where there is no such previous copy, use the approach of #2 above as a fallback default - but, again, use it differently for each `ch*' command: use only the appropriate info (field) from the current (cursor line) file as the default value. And of course state in the doc string for each such command where the default value comes from. IOW, let users know how they can control what default value is made available. Such a *generalized copy/paste feature* for Dired would be quite useful. You could easily modify any set of files or directories according to any of the displayed Dired/`ls' fields. Even the file/dir name could be copied this way for reuse by editing when renaming another file/dir. (When there are multiple marked files to be renamed, the copied name could perhaps be incremented with a seed string in some way (which must be made clear to users). E.g., if the copied file name is `foo' and the (prompted for seed) is "-1000" then the renamed files could be `foo-1000', `foo-1001', etc. There are various possibities here. I mention this part only as food for thought, for now.) In GNU Emacs 24.0.92.1 (i386-mingw-nt5.1.2600) of 2012-01-22 on MARVIN Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (4.6) --no-opt --cflags -ID:/devel/emacs/libs/libXpm-3.5.8/include -ID:/devel/emacs/libs/libXpm-3.5.8/src -ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include -ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include -ID:/devel/emacs/libs/giflib-4.1.4-1/include -ID:/devel/emacs/libs/jpeg-6b-4/include -ID:/devel/emacs/libs/tiff-3.8.2-1/include -ID:/devel/emacs/libs/gnutls-3.0.9/include --ldflags -LD:/devel/emacs/libs/gnutls-3.0.9/lib'