From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Dan Jacobson Newsgroups: gmane.emacs.bugs Subject: Re: dired "!" hints baffled by multiple sources of same answer Date: Thu, 06 Mar 2003 03:04:27 +0800 Sender: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: <87k7fdfxdw.fsf@jidanni.org> References: <87bs0x420f.fsf@jidanni.org> <3E64FAA1.4040206@ihs.com> Reply-To: Dan Jacobson NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1046905037 4884 80.91.224.249 (5 Mar 2003 22:57:17 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 5 Mar 2003 22:57:17 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Wed Mar 05 23:57:16 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18qhp6-0001GQ-00 for ; Wed, 05 Mar 2003 23:57:16 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18qhoc-0003EG-0B for gnu-bug-gnu-emacs@m.gmane.org; Wed, 05 Mar 2003 17:56:46 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18qhnZ-0002x5-00 for bug-gnu-emacs@gnu.org; Wed, 05 Mar 2003 17:55:41 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18qhmt-0002Qi-00 for bug-gnu-emacs@gnu.org; Wed, 05 Mar 2003 17:55:01 -0500 Original-Received: from main.gmane.org ([80.91.224.249]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18qhks-0001I5-00 for bug-gnu-emacs@gnu.org; Wed, 05 Mar 2003 17:52:55 -0500 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 18qhkJ-0000w8-00 for ; Wed, 05 Mar 2003 23:52:19 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: bug-gnu-emacs@gnu.org Original-Received: from news by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 18qhkI-0000vy-00 for ; Wed, 05 Mar 2003 23:52:18 +0100 Original-Lines: 43 Original-X-Complaints-To: usenet@main.gmane.org User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-pc-linux-gnu) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:4569 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:4569 >> [the dired-x Shell Command Guessing etc. info node] says "Dired only >> tries to guess a command for a single file, never for a >> list of marked files." but in fact it does, if the marked files have >> the same suffix it seems. so say so in Info >> But if it plans to use xloadimage on .jpg's and use xloadimage on >> .gif's, then it should use xloadimage when presented with a list >> that are all .jpg's and .gif's. K> dired-x.el says: K> ;;; * Parse `dired-guess-shell-alist-user' and K> ;;; `dired-guess-shell-alist-default' (in that order) for the first REGEXP K> ;;; that matches the first file in the file list. K> ;;; K> ;;; * If the REGEXP matches all the entries of the file list then evaluate K> ;;; COMMAND, which is either a string or a Lisp expression returning a K> ;;; string. COMMAND may be a list of commands. K> What are dired-guess-shell-alist-user and dired-guess-shell-alist-default set K> to? If they have an entry like K> ("\\.\\(gif\\|jpg\\)\\'" . "xloadimage") K> instead of (or in front of) 2 separate entries for GIF and JPEG files, then it K> should work the way you want. Well they aren't so it doesn't: $ grep xloadim /usr/share/emacs/21.2/lisp/dired-x.el '("\\.e?ps$" "ghostview" "xloadimage" "lpr") '("\\.p[bgpn]m$" "xloadimage") '("\\.gif$" "xloadimage") ; view gif pictures '("\\.tif$" "xloadimage") '("\\.png$" "display") ; xloadimage 4.1 doesn't grok PNG '("\\.jpg$" "xloadimage") So, the dired-x fellow should either make them all into (xxx|yyy|zzz) stings, less ideal; or more ideal, do a better matching scheme... also allow case insensitivity, so one can also match .JPG's etc. without having to write everything twice.