Remove some sections related to pdf-tools (since I don't use it)

This commit is contained in:
Evie Litherland-Smith 2024-01-13 14:27:11 +00:00
parent 378cac82e8
commit b619f6a4d3

View file

@ -1526,17 +1526,6 @@ Set fill column to 88 and enable display in python buffers
;; to have the buffer refresh after compilation ;; to have the buffer refresh after compilation
(add-hook 'TeX-after-compilation-finished-functions #'TeX-revert-document-buffer)) (add-hook 'TeX-after-compilation-finished-functions #'TeX-revert-document-buffer))
(defun crafted-latex-use-pdf-tools ()
"Use PDF Tools instead of docview, requires a build environment
to compile PDF Tools.
Depends on having `pdf-tools'."
(with-eval-after-load 'latex
(customize-set-variable 'TeX-view-program-selection '((output-pdf "PDF Tools")))
(customize-set-variable 'TeX-view-program-list '(("PDF Tools" TeX-pdf-tools-sync-view)))
(customize-set-variable 'TeX-source-correlate-start-server t)))
;; message the user if the latex executable is not found ;; message the user if the latex executable is not found
(defun crafted-writing-tex-warning-if-no-latex-executable () (defun crafted-writing-tex-warning-if-no-latex-executable ()
"Print a message to the minibuffer if the \"latex\" executable cannot be found." "Print a message to the minibuffer if the \"latex\" executable cannot be found."
@ -1574,16 +1563,4 @@ Set fill column to 88 and enable display in python buffers
(customize-set-variable 'markdown-enable-math t) (customize-set-variable 'markdown-enable-math t)
(customize-set-variable 'markdown-enable-html t) (customize-set-variable 'markdown-enable-html t)
(add-hook 'markdown-mode-hook #'conditionally-turn-on-pandoc))) (add-hook 'markdown-mode-hook #'conditionally-turn-on-pandoc)))
;;; PDF Support when using pdf-tools
(when (locate-library "pdf-tools")
;; load pdf-tools when going into doc-view-mode
(defun crafted-writing-load-pdf-tools ()
"Attempts to require pdf-tools, but for attaching to hooks."
(require 'pdf-tools nil :noerror))
(add-hook 'doc-view-mode-hook #'crafted-writing-load-pdf-tools)
;; when pdf-tools is loaded, apply settings.
(with-eval-after-load 'pdf-tools
(setq-default pdf-view-display-size 'fit-width)))
#+end_src #+end_src