GNU bug report logs -
#18132
Time for a smarter dired-guess-shell-alist-default? (dired-x.el)
Previous Next
Reported by: Reuben Thomas <rrt <at> sc3d.org>
Date: Mon, 28 Jul 2014 18:27:01 UTC
Severity: wishlist
Fixed in version 30.0.50
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
Message #149 received at 18132 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
> OK, now pushed.
More problems: XDG has much better support for media files
than dired-guess-shell-alist-default that contains many
old obsolete and random commands for media files.
OTOH, dired-guess-shell-alist-default has much better support
for non-media files than XDG and mailcap.
So currently there is no way to configure
shell-command-guess-functions to use only best commands.
When shell-command-guess-functions is configured to
'(shell-command-guess-xdg shell-command-guess-dired)
then images are opened with "xloadimage" that doesn't exist.
But when shell-command-guess-functions is configured to
'(shell-command-guess-dired shell-command-guess-xdg)
then images are opened with the existing program like "display",
but then patches can't be applied, because XDG provides
for patch files such useless commands as "more" and "less".
All this can be fixed by this patch that removes old
media commands from 'dired-guess-shell-alist-default'.
Then removed commands will not override media commands
from shell-command-guess-xdg.
[dired-guess-shell-alist-default.patch (text/x-diff, inline)]
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index 0998e76c410..de54968bdbe 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -1216,28 +1216,28 @@ dired-guess-shell-alist-default
" " dired-guess-shell-znew-switches))
'("\\.pod\\'" "perldoc" "pod2man * | nroff -man")
- '("\\.dvi\\'" "xdvi" "dvips") ; preview and printing
- '("\\.au\\'" "play") ; play Sun audiofiles
- '("\\.mpe?g\\'\\|\\.avi\\'" "xine -p")
- '("\\.ogg\\'" "ogg123")
- '("\\.mp3\\'" "mpg123")
- '("\\.wav\\'" "play")
+ ;; '("\\.dvi\\'" "xdvi" "dvips") ; preview and printing
+ ;; '("\\.au\\'" "play") ; play Sun audiofiles
+ ;; '("\\.mpe?g\\'\\|\\.avi\\'" "xine -p")
+ ;; '("\\.ogg\\'" "ogg123")
+ ;; '("\\.mp3\\'" "mpg123")
+ ;; '("\\.wav\\'" "play")
'("\\.uu\\'" "uudecode") ; for uudecoded files
'("\\.hqx\\'" "mcvert")
'("\\.sh\\'" "sh") ; execute shell scripts
- '("\\.xbm\\'" "bitmap") ; view X11 bitmaps
+ ;; '("\\.xbm\\'" "bitmap") ; view X11 bitmaps
'("\\.gp\\'" "gnuplot")
- '("\\.p[bgpn]m\\'" "xloadimage")
- '("\\.gif\\'" "xloadimage") ; view gif pictures
- '("\\.tif\\'" "xloadimage")
- '("\\.png\\'" "display") ; xloadimage 4.1 doesn't grok PNG
- '("\\.jpe?g\\'" "xloadimage")
+ ;; '("\\.p[bgpn]m\\'" "xloadimage")
+ ;; '("\\.gif\\'" "xloadimage") ; view gif pictures
+ ;; '("\\.tif\\'" "xloadimage")
+ ;; '("\\.png\\'" "display") ; xloadimage 4.1 doesn't grok PNG
+ ;; '("\\.jpe?g\\'" "xloadimage")
'("\\.fig\\'" "xfig") ; edit fig pictures
'("\\.out\\'" "xgraph") ; for plotting purposes.
'("\\.tex\\'" "latex" "tex")
'("\\.texi\\(nfo\\)?\\'" "makeinfo" "texi2dvi")
- '("\\.pdf\\'" "xpdf")
- '("\\.doc\\'" "antiword" "strings")
+ ;; '("\\.pdf\\'" "xpdf")
+ ;; '("\\.doc\\'" "antiword" "strings")
'("\\.rpm\\'" "rpm -qilp" "rpm -ivh")
'("\\.dia\\'" "dia")
'("\\.mgp\\'" "mgp")
@@ -1320,7 +1320,9 @@ dired-guess-shell-command
(if (equal val "") default val))))
(defcustom shell-command-guess-functions
- '(shell-command-guess-dired)
+ '(shell-command-guess-mailcap
+ shell-command-guess-xdg
+ shell-command-guess-dired)
"List of functions that guess shell commands for files.
Each function receives a list of commands and a list of file names
and should return the same list of commands with changes
This bug report was last modified 363 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.