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
View this message in rfc822 format
Eli Zaretskii <eliz <at> gnu.org> writes:
> It's not only that. Emacs's ability to run programs given a file can
> extend and surpass those of the underlying OS, and the ability of
> Emacs users to configure and customize that in a unified
> system-independent manner are either better or simply not available at
> all in the OS-level tools which offer similar functionality.
>
> So I think it would be nice to extend dired-guess-shell-* so that it
> could delegate to the OS-level capabilities like xdg-open or
> w32-shell-execute, but we should preserve the abilities to override or
> extend that with Emacs-level associations between files and programs.
That sounds like exactly the right thing to do. So we need to add stuff
here, without taking anything away.
However, I will add that while we maintain our current capabilities for
customization, we might want to consider removing or updating some
entries from `dired-guess-shell-alist-default'. For example, we
currently recommend xpdf for PDF:s, which, sure, is presumably available
"everywhere", but also is pretty lacking in features and just plain
clunky compared to something like evince.
To make matters even worse,
emacs -Q --eval "(progn (require 'dired-x) (dired \"~\"))"
happily offers up xpdf as the default command for PDF:s even though I
don't even have xpdf installed! So perhaps it's not that ubiquitous
these days... you have to specifically install it to even have it.
Looking even more closely at this, I guess `xdg-open' could be used as
some final fallback, but it doesn't seem to add anything that isn't
already available from mailcap? And we already have
`mailcap-file-default-commands', so why not just provide a default based
on that?
On my machine, I get the very reasonable:
(mailcap-file-default-commands '("foo.pdf"))
=> ("evince" "xdg-open")
So why not just move the guessing stuff over to dired.el, re-base it on
mailcap, and minimize the list in `dired-guess-shell-alist-default' to
something more reasonable. Perhaps that list could be just nil by
default if we have the usual mailcap stuff?
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.