From e7465018fcd6fd11c095df0a835ae4fa4c101271 Mon Sep 17 00:00:00 2001 From: Patrick Elliott Date: Wed, 18 Jul 2018 13:38:48 +0200 Subject: [PATCH] This shouldn't be tied to pdf-tools --- modules/lang/latex/+viewers.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/lang/latex/+viewers.el b/modules/lang/latex/+viewers.el index 1e102767a..2f0519a0e 100644 --- a/modules/lang/latex/+viewers.el +++ b/modules/lang/latex/+viewers.el @@ -1,5 +1,8 @@ ;;; lang/latex/+viewers.el -*- lexical-binding: t; -*- +;; Update PDF buffers after successful LaTeX runs +(add-hook 'TeX-after-compilation-finished-function #'TeX-revert-document-buffer) + (when (featurep! +okular) ;; Configure Okular as viewer. Including a bug fix ;; (https://bugs.kde.org/show_bug.cgi?id=373855) @@ -17,6 +20,4 @@ ;; Or PDF-tools, but only if the module is also loaded (when (and (featurep! :tools pdf) (featurep! +pdf-tools)) - (add-to-list 'TeX-view-program-selection '(output-pdf "PDF Tools")) - ;; Enable auto reverting the PDF document with PDF Tools - (add-hook 'TeX-after-compilation-finished-functions #'TeX-revert-document-buffer)) + (add-to-list 'TeX-view-program-selection '(output-pdf "PDF Tools")))