dot/emacs: Have w3m display PDF files in Evince.
authorMark Wooding <mdw@distorted.org.uk>
Thu, 4 Feb 2010 13:24:52 +0000 (13:24 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Thu, 4 Feb 2010 13:26:20 +0000 (13:26 +0000)
Maybe I'll prefer DocView eventually, but for now...

dot/emacs

index bed70b6..f70c338 100644 (file)
--- a/dot/emacs
+++ b/dot/emacs
 
 (setq w3m-default-display-inline-images t)
 
+(eval-after-load "w3m"
+  '(let ((entries '(("application/pdf" "\\.pdf\\'" ("evince" file) nil)
+                   ("application/x-pdf" "\\.pdf\\'" ("evince" file) nil))))
+     (dolist (e entries)
+       (setq w3m-content-type-alist
+            (cons e (remove* (car e) w3m-content-type-alist
+                             :key #'car :test #'string=))))))
+
 (setq w3-do-incremental-display t
       w3-use-menus '(file edit view go bookmark options
                     buffers style search emacs nil help)