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#17251: 24.4.50; `dired-guess-default': wrong logic Date: Sat, 12 Apr 2014 09:28:34 -0700 (PDT) Message-ID: <0628ccb7-0ee6-4522-bfba-bc853c5e8985@default> References: <97d70b54-93f6-4247-9a29-68145f9d8965@default> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1397320173 27206 80.91.229.3 (12 Apr 2014 16:29:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 12 Apr 2014 16:29:33 +0000 (UTC) To: 17251@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Apr 12 18:29:26 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WZ0o1-0007Py-WC for geb-bug-gnu-emacs@m.gmane.org; Sat, 12 Apr 2014 18:29:26 +0200 Original-Received: from localhost ([::1]:35048 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WZ0o1-0007Pa-FQ for geb-bug-gnu-emacs@m.gmane.org; Sat, 12 Apr 2014 12:29:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53881) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WZ0nq-0007PR-H9 for bug-gnu-emacs@gnu.org; Sat, 12 Apr 2014 12:29:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WZ0nf-0008GP-4S for bug-gnu-emacs@gnu.org; Sat, 12 Apr 2014 12:29:14 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38227) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WZ0nf-0008GL-0z for bug-gnu-emacs@gnu.org; Sat, 12 Apr 2014 12:29:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WZ0ne-00028I-Eq for bug-gnu-emacs@gnu.org; Sat, 12 Apr 2014 12:29:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 12 Apr 2014 16:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17251 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17251-submit@debbugs.gnu.org id=B17251.13973201268173 (code B ref 17251); Sat, 12 Apr 2014 16:29:02 +0000 Original-Received: (at 17251) by debbugs.gnu.org; 12 Apr 2014 16:28:46 +0000 Original-Received: from localhost ([127.0.0.1]:46384 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WZ0nN-00027j-6Z for submit@debbugs.gnu.org; Sat, 12 Apr 2014 12:28:45 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:22726) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WZ0nK-00027Q-ES for 17251@debbugs.gnu.org; Sat, 12 Apr 2014 12:28:43 -0400 Original-Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s3CGSZKj010313 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for <17251@debbugs.gnu.org>; Sat, 12 Apr 2014 16:28:36 GMT Original-Received: from userz7022.oracle.com (userz7022.oracle.com [156.151.31.86]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s3CGSXmF025475 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for <17251@debbugs.gnu.org>; Sat, 12 Apr 2014 16:28:35 GMT Original-Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by userz7022.oracle.com (8.14.5+Sun/8.14.4) with ESMTP id s3CGSXb4000391 for <17251@debbugs.gnu.org>; Sat, 12 Apr 2014 16:28:33 GMT In-Reply-To: <97d70b54-93f6-4247-9a29-68145f9d8965@default> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6691.5000 (x86)] X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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:87977 Archived-At: In fact, at the top of the section of `dired-x.el' which implements this, you will find an English description of the overly restrictive logic: ;;; GUESS SHELL COMMAND. ;; Brief Description: ;;; ;; * `dired-do-shell-command' is bound to `!' by dired.el. ;;; ;; * `dired-guess-shell-command' provides smarter defaults for ;;; dired-aux.el's `dired-read-shell-command'. ;;; ;; * `dired-guess-shell-command' calls `dired-guess-default' with list of ;;; marked files. ;;; ;; * Parse `dired-guess-shell-alist-user' and ;;; `dired-guess-shell-alist-default' (in that order) for the first REGEX= P ;;; that matches the first file in the file list. ;;; ;; * If the REGEXP matches all the entries of the file list then evaluate ;;; COMMAND, which is either a string or a Lisp expression returning a ;;; string. COMMAND may be a list of commands. ;;; ;; * Return this command to `dired-guess-shell-command' which prompts user ;;; with it. The list of commands is put into the list of default values= . ;;; If a command is used successfully then it is stored permanently in ;;; `dired-shell-command-history'. The inappropriate part of the logic is described in the 5th bullet. The logic should not be to require that a single REGEXP (the first regexp) "matches all the entries of the file list" in order to find the appropriate COMMAND. It should be to require that all files in the file list are associated with the same COMMAND. Individual files in the list should be able to be associated with the COMMAND in different ways (i.e., using different regexps).