GNU bug report logs - #18132
Time for a smarter dired-guess-shell-alist-default? (dired-x.el)

Previous Next

Package: emacs;

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

From: Stefan Kangas <stefan <at> marxist.se>
To: Reuben Thomas <rrt <at> sc3d.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 18132 <at> debbugs.gnu.org
Subject: bug#18132: Time for a smarter dired-guess-shell-alist-default? (dired-x.el)
Date: Sat, 23 Oct 2021 06:56:59 -0700
Reuben Thomas <rrt <at> sc3d.org> writes:

> xdg-open uses the underlying desktop system's MIME infrastructure. For a
> GNU system, that would most typically be GNOME, and its "gio open" (or on
> older systems, gvfs-open) command.

I don't see that shooting away blindly to xdg-open is satisfactory; the
user should be able to a) know which command is being run before running
it and b) modify it on the fly.  Maybe I want to open PDF:s first with
one and then another PDF reader to see if it looks the same, just as I
would be able to from a graphical file manager.

Thus, the most important question to my mind is "how can we get the
default command for a file in the best way".

I think ideally we should get this from the system, optionally with
overrides and/or fallbacks from Emacs or the user.  I don't particularly
care if it comes from mailcap, from /usr/share/applications, but we
should preferably pick the "best" one.

Eli says that portability is a concern with mailcap, which is true but
also not something we can't work around.

You say that mailcap is the wrong tool for the job.  (Why?)

I claim that the `xdg-open' script does not seem to solve the problem.

Then I ask: what is the correct tool for the job of finding the command
to run?

Maybe we need try several different things?  I see that `xdg-open' tries
all kinds of different things ("gio open", "gvfs open", "open_generic",
etc.).  But our needs are different: we want the command as a string, we
don't just want to run it.

PS. For the sake of simplicity, I would suggest that we could first
    figure out what to do on GNU/Linux and then we'll see if we can get
    that solution to work elsewhere or if we need to get other things in
    place.




This bug report was last modified 1 year and 49 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.