Post by Dave GoldbergSo 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/