* dired "!" hints baffled by multiple sources of same answer
@ 2003-02-28 1:39 Dan Jacobson
[not found] ` <E18pEme-0000y8-00@fencepost.gnu.org>
0 siblings, 1 reply; 4+ messages in thread
From: Dan Jacobson @ 2003-02-28 1:39 UTC (permalink / raw)
In dired, mark 3 *.gifs and hit !
! on * [3 files]: [xloadimage]
it wisely suggests.
Now mark a fourth, a *.jpg
! on * [4 files]:
Ah ha... bzzzzt. No helpful guess now. Pure *.gifs: xloadimage. Pure
*.jpgs: xloadimage. Mixed: that does not compute. Like take me back
to the repairshop.
--
http://jidanni.org/ Taiwan(04)25854780
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: dired "!" hints baffled by multiple sources of same answer
[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>
1 sibling, 0 replies; 4+ messages in thread
From: Dan Jacobson @ 2003-03-02 21:32 UTC (permalink / raw)
Cc: emacs21
DJ> In dired, mark 3 *.gifs and hit !
DJ> ! on * [3 files]: [xloadimage]
RMS> That isn't part of standard Dired.
Excuses, excuses. Does not dired-x-submit-report send to this same
mailing list? Indeed,
;; Maintainer: FSF (unless Dodd can be found)
4 lines matching "please" in buffer dired-x.el.
37:;; Please, PLEASE, *PLEASE* see the info pages.
57:;; bind some dired keys. *Please* see the info pages for more details.
59:;; *Please* see the info pages for more details.
83:;; the end of any of the variable names, and hit C-h v [RET]. *Please* see
OK, I would but the dired-x Shell Command Guessing etc. info node are
not in the emacs info tree but instead next to it, at least on debian.
There it 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. 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.
--
http://jidanni.org/ Taiwan(04)25854780
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: dired "!" hints baffled by multiple sources of same answer
[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
0 siblings, 1 reply; 4+ messages in thread
From: Kevin Rodgers @ 2003-03-04 19:12 UTC (permalink / raw)
Dan Jacobson wrote:
> OK, I would but the dired-x Shell Command Guessing etc. info node are
> not in the emacs info tree but instead next to it, at least on debian.
>
> [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. 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.
dired-x.el says:
;;; * Parse `dired-guess-shell-alist-user' and
;;; `dired-guess-shell-alist-default' (in that order) for the first REGEXP
;;; 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.
What are dired-guess-shell-alist-user and dired-guess-shell-alist-default set
to? If they have an entry like
("\\.\\(gif\\|jpg\\)\\'" . "xloadimage")
instead of (or in front of) 2 separate entries for GIF and JPEG files, then it
should work the way you want.
--
<a href="mailto:<kevin.rodgers@ihs.com>">Kevin Rodgers</a>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: dired "!" hints baffled by multiple sources of same answer
2003-03-04 19:12 ` Kevin Rodgers
@ 2003-03-05 19:04 ` Dan Jacobson
0 siblings, 0 replies; 4+ messages in thread
From: Dan Jacobson @ 2003-03-05 19:04 UTC (permalink / raw)
>> [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.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-03-05 19:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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).