From: Lars Ingebrigtsen <larsi@gnus.org>
To: david.goldberg6@verizon.net (Dave Goldberg)
Cc: ding@gnus.org
Subject: Re: Recent Emacs doesn't respect my mailcap
Date: Thu, 29 Jan 2015 13:21:29 +1100 [thread overview]
Message-ID: <874mranx7a.fsf@building.gnus.org> (raw)
In-Reply-To: <841tmf7jpt.fsf@davestoy.home> (Dave Goldberg's message of "Tue, 27 Jan 2015 20:54:54 -0500")
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/
prev parent reply other threads:[~2015-01-29 2:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.18666.1422291069.1147.help-gnu-emacs@gnu.org>
[not found] ` <87386xf5gx.fsf@building.gnus.org>
[not found] ` <mailman.18710.1422322318.1147.help-gnu-emacs@gnu.org>
[not found] ` <87386xdmzp.fsf@building.gnus.org>
[not found] ` <mailman.18712.1422322837.1147.help-gnu-emacs@gnu.org>
2015-01-27 1:58 ` Lars Magne Ingebrigtsen
2015-01-27 2:11 ` Rasmus
2015-01-27 2:42 ` Lars Ingebrigtsen
2015-01-27 3:01 ` Eric Abrahamsen
2015-01-27 3:01 ` Lars Ingebrigtsen
2015-01-27 3:59 ` Eric Abrahamsen
2015-01-27 4:47 ` Lars Ingebrigtsen
2015-01-27 5:08 ` Eric Abrahamsen
2015-01-28 1:54 ` Dave Goldberg
2015-01-29 2:21 ` Lars Ingebrigtsen [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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874mranx7a.fsf@building.gnus.org \
--to=larsi@gnus.org \
--cc=david.goldberg6@verizon.net \
--cc=ding@gnus.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 NNTP newsgroup(s).