* How do you use mailcap-mime-data?
@ 2017-12-10 17:11 Eric Abrahamsen
0 siblings, 0 replies; only message in thread
From: Eric Abrahamsen @ 2017-12-10 17:11 UTC (permalink / raw)
To: ding
I've been trying for a while to get Emacs to use xdg-open when opening
any/all files in an external program: I don't want to have to maintain
duplicate file/program associations both inside Emacs and on my system.
(I'm on arch linux, no DE.)
That includes attachments in Gnus. I have this in my setup:
(setq mailcap-mime-data
'(("application" (".*" (viewer . "xdg-open %s")))))
Which presumably the internet told me at some point was the right thing
to do.
This causes some failures, however, because there's no `type' key in the
assoc list. The `mailcap-mime-types' function expects all entries to
have a `type' key with a string value, and blows up otherwise.
The docstring of `mailcap-mime-data' doesn't mention a `type' key,
though the default values all have it.
My question(s) is/are:
1. Should I be doing this some other way?
2. Should the `mailcap-mime-data' docstring mention the `type' key?
3. Should `mailcap-mime-types' check for a nil `type' key and not barf?
4. Why, after manually setting `mailcap-mime-data', does it now have the
below value?
Help with any/all of these questions much appreciated!
(("audio"
(".*"
(viewer . "/usr/bin/xdg-open %s")
(type . "audio/*")))
("image"
(".*"
(viewer . "/usr/bin/xdg-open %s")
(type . "image/*")))
("text"
("html"
(viewer . "/usr/bin/xdg-open %s ")
(type . "text/html")
("copiousoutput" . t)))
("application"
("msword"
(viewer . "/usr/bin/xdg-open %s")
(type . "application/msword"))
("pdf"
(viewer . "/usr/bin/xdg-open %s")
(type . "application/pdf"))
("postscript"
(viewer . "/usr/bin/xdg-open %s")
(type . "application/postscript"))
(".*" (viewer . "xdg-open %s"))))
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-12-10 17:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-10 17:11 How do you use mailcap-mime-data? Eric Abrahamsen
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 NNTP newsgroup(s).