unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Ben Bacarisse <ben.usenet@bsb.me.uk>
To: help-gnu-emacs@gnu.org
Subject: Re: mailcap MIME type handlers
Date: Sun, 23 Sep 2018 15:38:46 +0100	[thread overview]
Message-ID: <87fty0i8i1.fsf@bsb.me.uk> (raw)
In-Reply-To: mailman.1164.1537683367.1284.help-gnu-emacs@gnu.org

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.


      parent reply	other threads:[~2018-09-23 14:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-23  2:52 mailcap MIME type handlers Ben Bacarisse
2018-09-23  6:08 ` Teemu Likonen
     [not found] ` <mailman.1164.1537683367.1284.help-gnu-emacs@gnu.org>
2018-09-23 14:38   ` Ben Bacarisse [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fty0i8i1.fsf@bsb.me.uk \
    --to=ben.usenet@bsb.me.uk \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).