From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/85646 Path: news.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.gnus.general Subject: Re: Recent Emacs doesn't respect my mailcap Date: Thu, 29 Jan 2015 13:21:29 +1100 Message-ID: <874mranx7a.fsf@building.gnus.org> References: <87386xf5gx.fsf@building.gnus.org> <87386xdmzp.fsf@building.gnus.org> <87h9vdc7cn.fsf@building.gnus.org> <87egqhrmzv.fsf@gmx.us> <87a915c5an.fsf@building.gnus.org> <87ppa1rkp7.fsf@ericabrahamsen.net> <87386xc4fh.fsf@building.gnus.org> <87fvawri03.fsf@ericabrahamsen.net> <878ugobzjs.fsf@building.gnus.org> <87lhkoq081.fsf@ericabrahamsen.net> <841tmf7jpt.fsf@davestoy.home> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1422498214 15310 80.91.229.3 (29 Jan 2015 02:23:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 29 Jan 2015 02:23:34 +0000 (UTC) Cc: ding@gnus.org To: david.goldberg6@verizon.net (Dave Goldberg) Original-X-From: ding-owner+M33887@lists.math.uh.edu Thu Jan 29 03:23:30 2015 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YGelS-0004TB-C8 for ding-account@gmane.org; Thu, 29 Jan 2015 03:23:26 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1YGel1-0006Lx-VF; Wed, 28 Jan 2015 20:23:00 -0600 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES128-SHA:128) (Exim 4.63) (envelope-from ) id 1YGel0-0006Lm-90 for ding@lists.math.uh.edu; Wed, 28 Jan 2015 20:22:58 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtps (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.84) (envelope-from ) id 1YGeky-0007f7-HF for ding@lists.math.uh.edu; Wed, 28 Jan 2015 20:22:57 -0600 Original-Received: from smtp.syd.comcen.com.au ([203.23.236.77]) by quimby.gnus.org with esmtp (Exim 4.80) (envelope-from ) id 1YGekw-0005GP-6V for ding@gnus.org; Thu, 29 Jan 2015 03:22:54 +0100 Original-Received: from building.gnus.org ([27.96.197.126]) by smtp.syd.comcen.com.au (8.13.4/8.12.9) with ESMTP id t0T2LYwF031510; Thu, 29 Jan 2015 13:21:34 +1100 (EST) In-Reply-To: <841tmf7jpt.fsf@davestoy.home> (Dave Goldberg's message of "Tue, 27 Jan 2015 20:54:54 -0500") User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) X-comcen-MailScanner-Information: Please contact the ISP for more information X-comcen-MailScanner: Found to be clean X-comcen-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=0.096, required 4, AWL 0.01, BAYES_40 -0.01, RDNS_NONE 0.10) X-comcen-MailScanner-From: larsi@gnus.org X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:85646 Archived-At: david.goldberg6@verizon.net (Dave Goldberg) writes: > So I've been silently grumbling about this issue for a couple months, > but I've just gotten used to calling ...-view-part-interactively (from > the context menu) and running acrobat reader. docview is really not > an option at work (where most of my PDF dealings come from) since my > company uses some of the more irritating PDF features like digital > signatures. Whether that's done via view-part or view-part-externally > (assuming there's a strong desire to have view-part favor an internal > function) doesn't bother me but it would be nice if > view-part-externally did what I told it to do. Indeed. I don't understand this function at all. So, it gets the method from `(mailcap-mime-info type)', which has this default in most Emacsen: (mailcap-mime-info "application/pdf") => doc-view-mode And that's obviously not a string, so it calls `gnus-mime-view-part-as-type' with a nil type, so you get prompted for a type? But if it does return a string, then `mm-display-part' is called with the default handling method? (So we get an external viewer.) Err... Am I totally misreading this, or is it kinda nonsensical? (defun gnus-mime-view-part-externally (&optional handle) "View the MIME part under point with an external viewer." (interactive) (gnus-article-check-buffer) (let* ((handle (or handle (get-text-property (point) 'gnus-data))) (mm-inlined-types nil) (mail-parse-charset gnus-newsgroup-charset) (mail-parse-ignored-charsets (with-current-buffer gnus-summary-buffer gnus-newsgroup-ignored-charsets)) (type (mm-handle-media-type handle)) (method (mailcap-mime-info type)) (mm-enable-external t)) (if (not (stringp method)) (gnus-mime-view-part-as-type nil (lambda (type) (stringp (mailcap-mime-info type)))) (when handle (mm-display-part handle nil t))))) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/