From 51b69c4221e14d3a9e4371e5ae4516e50104e98e Mon Sep 17 00:00:00 2001 From: JSDurand Date: Tue, 20 Apr 2021 20:44:40 +0800 Subject: Use pdf-view to view PDF files if available. * eww-conf.el (mailcap-prefer-mailcap-viewers): (mailcap-user-mime-data): Set the user-data since otherwise this should be set via a dedicated mailcap file, which is cumbersome to specify pdf-view-mode in Emacs, as far as I know. --- eww-conf.el | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'eww-conf.el') diff --git a/eww-conf.el b/eww-conf.el index d3f3173..c9a3d79 100644 --- a/eww-conf.el +++ b/eww-conf.el @@ -20,6 +20,18 @@ (setq eww-suggest-uris '(eww-links-at-point thing-at-point-url-at-point)) (setq eww-browse-url-new-window-is-tab nil) +;;; Use pdf-view to view PDF files if available. + +(setq mailcap-prefer-mailcap-viewers nil) + +(setq mailcap-user-mime-data + '(((viewer . pdf-view-mode) + (type . "application/pdf") + (test . window-system)) + ((viewer . doc-view-mode) + (type . "application/pdf") + (test . window-system)))) + ;; key-bindings (define-key global-map (vector ?\s-w) #'durand-eww-map) -- cgit v1.2.3-18-g5258