From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Ben Bacarisse Newsgroups: gmane.emacs.help Subject: Re: mailcap MIME type handlers Date: Sun, 23 Sep 2018 15:38:46 +0100 Organization: A noiseless patient Spider Message-ID: <87fty0i8i1.fsf@bsb.me.uk> References: <87va6xudrg.fsf@bsb.me.uk> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1537713505 22349 195.159.176.226 (23 Sep 2018 14:38:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 23 Sep 2018 14:38:25 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Sep 23 16:38:21 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g45We-0005ir-FW for geh-help-gnu-emacs@m.gmane.org; Sun, 23 Sep 2018 16:38:21 +0200 Original-Received: from localhost ([::1]:40780 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g45Yk-0004Qu-IY for geh-help-gnu-emacs@m.gmane.org; Sun, 23 Sep 2018 10:40:30 -0400 X-Received: by 2002:a1c:4b04:: with SMTP id y4-v6mr301183wma.2.1537713527343; Sun, 23 Sep 2018 07:38:47 -0700 (PDT) Original-Path: usenet.stanford.edu!q200-v6no4577864wmd.0!news-out.google.com!a22-v6ni17384wmg.0!nntp.google.com!proxad.net!feeder1-2.proxad.net!feeder.erje.net!2.eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed9.news.xs4all.nl!2a00:1d38:fa:feed::184.MISMATCH!feeder4.usenet.farm!feed.usenet.farm!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 32 Original-Injection-Info: reader02.eternal-september.org; posting-host="bd05ef6332e88c6a8eb9707de337af74"; logging-data="9107"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+g/I1sOSAi9cBpZhuQuGfQG9eH8/3ycqk=" Cancel-Lock: sha1:cwkaH7ZrpEllA5mxbwu6m027XDU= sha1:mIuMWhB01HECb8UD8akx6nbpHaY= X-BSB-Auth: 1.7ca24eba2875eb3126c1.20180923153846BST.87fty0i8i1.fsf@bsb.me.uk Original-Xref: usenet.stanford.edu gnu.emacs.help:223857 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:117982 Archived-At: Teemu Likonen 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.