fixing the dire situation with viewing pdfs
This commit is contained in:
parent
d78cdf6cc7
commit
633a1cdc6c
1 changed files with 3 additions and 26 deletions
29
init.el
29
init.el
|
@ -94,32 +94,9 @@
|
||||||
;; worked"™ in vim? That's what you pay with for org mode
|
;; worked"™ in vim? That's what you pay with for org mode
|
||||||
(add-hook 'cc-mode-hook 'tabs-yay)
|
(add-hook 'cc-mode-hook 'tabs-yay)
|
||||||
|
|
||||||
;; time to throw out this "DocView" abomination: full featured pdf
|
;; pdftools ftw, docview is shit that needs to be left in the past
|
||||||
;; viewer of antiquity, that emacs uses today!
|
(require 'pdf-tools)
|
||||||
(defun ensc/mailcap-mime-data-filter (filter)
|
(pdf-loader-install)
|
||||||
(mapcar (lambda(major)
|
|
||||||
(append (list (car major))
|
|
||||||
(remove nil
|
|
||||||
(mapcar (lambda(minor)
|
|
||||||
(when (funcall filter (car major) (car minor) (cdr minor))
|
|
||||||
minor))
|
|
||||||
(cdr major)))))
|
|
||||||
mailcap-mime-data))
|
|
||||||
|
|
||||||
(defun ensc/no-pdf-doc-view-filter (major minor spec)
|
|
||||||
(if (and (string= major "application")
|
|
||||||
(string= minor "pdf")
|
|
||||||
(member '(viewer . doc-view-mode) spec))
|
|
||||||
nil
|
|
||||||
t))
|
|
||||||
|
|
||||||
(eval-after-load 'mailcap
|
|
||||||
'(progn
|
|
||||||
(setq mailcap-mime-data
|
|
||||||
(ensc/mailcap-mime-data-filter 'ensc/no-pdf-doc-view-filter))))
|
|
||||||
|
|
||||||
;; TODO: and this seems to make xdg-open work, but breaks python interpreter
|
|
||||||
;; (setq process-connection-type nil)
|
|
||||||
|
|
||||||
;; highlight the parens
|
;; highlight the parens
|
||||||
(setq show-paren-delay 0)
|
(setq show-paren-delay 0)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue