[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dired "!" hints baffled by multiple sources of same answer

From: Dan Jacobson
Subject: Re: dired "!" hints baffled by multiple sources of same answer
Date: Thu, 06 Mar 2003 03:04:27 +0800
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-pc-linux-gnu)

>> [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 
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. 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]