unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Dan Jacobson <jidanni@dman.ddts.net>
Subject: Re: dired "!" hints baffled by multiple sources of same answer
Date: Thu, 06 Mar 2003 03:04:27 +0800	[thread overview]
Message-ID: <87k7fdfxdw.fsf@jidanni.org> (raw)
In-Reply-To: 3E64FAA1.4040206@ihs.com

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

      reply	other threads:[~2003-03-05 19:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-28  1:39 dired "!" hints baffled by multiple sources of same answer Dan Jacobson
     [not found] ` <E18pEme-0000y8-00@fencepost.gnu.org>
2003-03-02 21:32   ` Dan Jacobson
     [not found]   ` <mailman.2663.1046649775.21513.bug-gnu-emacs@gnu.org>
2003-03-04 19:12     ` Kevin Rodgers
2003-03-05 19:04       ` Dan Jacobson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k7fdfxdw.fsf@jidanni.org \
    --to=jidanni@dman.ddts.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).