From a5af17b6aabfe2301f248924bcbf521309e724ff Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 9 Dec 2020 17:16:34 -0500 Subject: [PATCH] Fix #4397: call pdf-tools-install-noverify So pdf-tools has a chance to set up its hooks. --- modules/tools/pdf/config.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/tools/pdf/config.el b/modules/tools/pdf/config.el index 1371b5434..f32bc01a9 100644 --- a/modules/tools/pdf/config.el +++ b/modules/tools/pdf/config.el @@ -38,9 +38,8 @@ (message nil) ; flush lingering prompt in echo-area ;; Make sure this doesn't run more than once (advice-remove #'pdf-view-mode #'+pdf--install-epdfinfo-a) - (if (or (pdf-info-running-p) - (ignore-errors (pdf-info-check-epdfinfo) t)) - (pdf-tools-install-noverify) + (unless (or (pdf-info-running-p) + (ignore-errors (pdf-info-check-epdfinfo) t)) ;; HACK On the first pdf you open (before pdf-tools loaded) ;; `pdf-tools-install' throws errors because it has hardcoded ;; opinions about what buffer should be focused when it is run. @@ -61,6 +60,8 @@ (revert-buffer t t)))))))))) ((message "Aborted"))))) + (pdf-tools-install-noverify) + ;; For consistency with other special modes (map! :map pdf-view-mode-map :gn "q" #'kill-current-buffer)