[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: mailcap MIME type handlers
From: |
Ben Bacarisse |
Subject: |
Re: mailcap MIME type handlers |
Date: |
Sun, 23 Sep 2018 15:38:46 +0100 |
Teemu Likonen <tlikonen@iki.fi> writes:
> Ben Bacarisse [2018-09-23 03:52:03+01] wrote:
>
>> How can I get Emacs (specifically mailcap.el) to prioritise my
>> system's or my personal mailcap settings?
>>
>> Gnus, for example, opens PDF files in doc-view-mode rather than using
>> the program specified in /etc/mailcap or ~/.mailcap.
>
> Use variable mailcap-user-mime-data:
>
> (setq mailcap-user-mime-data
> '(((type . "application/pdf")
> (viewer . "my-viewer %s"))))
Thanks, but that's a bit of a sledge hammer! It looses all the other
settings, and duplicates where I specify the viewer.
I'd like mailcap.el to get the setting from ~/.mailcap. My current
work-around is to
(require 'mailcap)
(setq mailcap-mime-data nil)
(mailcap-parse-mailcaps nil t)
in .emacs, but that's also rather crude because it loses the default
settings from mailcap-user-mime-data, some of which may be useful (I
have not looked at them all). Not to mention doing all the work twice.
--
Ben.