Make eww use mailcap when displaying PDF files

Fixes: debbugs:19270

* net/eww.el (eww-display-pdf): Let mailcap determine how to
display PDF files.
parent 7747e23e
......@@ -210,6 +210,8 @@ xml.el/libxml2 DOM, and a new package dom.el has been added to
interact with this DOM. See the Emacs Lisp manual for interface
details.
*** `mailcap-mime-data' is now consulted when displaying PDF files.
** Message mode
*** text/html messages that contain inline image parts will be
......
2014-12-05 Lars Magne Ingebrigtsen <larsi@gnus.org>
* net/eww.el (eww-display-pdf): Let mailcap determine how to
display PDF files (bug#19270).
2014-12-05 Juri Linkov <juri@linkov.net>
Compare with the most recent window by default.
......
......@@ -493,6 +493,7 @@ See the `eww-search-prefix' variable for the search engine used."
(shr-put-image data nil))
(goto-char (point-min)))))
(declare-function mailcap-view-mime "mailcap" (type))
(defun eww-display-pdf ()
(let ((data (buffer-substring (point) (point-max))))
(switch-to-buffer (get-buffer-create "*eww pdf*"))
......@@ -500,7 +501,7 @@ See the `eww-search-prefix' variable for the search engine used."
(inhibit-read-only t))
(erase-buffer)
(insert data)
(doc-view-mode)))
(mailcap-view-mime "application/pdf")))
(goto-char (point-min)))
(defun eww-setup-buffer ()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment