summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorAndreas Politz <politza@hochschule-trier.de>2018-10-20 14:36:26 +0200
committerAndreas Politz <politza@hochschule-trier.de>2018-10-20 14:36:26 +0200
commit17169f3761fdc1f520708c84ef35cc750be9d5bd (patch)
tree87d67aabcd7359eb12bbe5edfb7d47e511ee876b /lisp
parent81dd607359ebf619e45dbcd6a94f26bf4efd0396 (diff)
Avoid errors while trying to read decrypted documents
Diffstat (limited to 'lisp')
-rw-r--r--lisp/pdf-view.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/pdf-view.el b/lisp/pdf-view.el
index 80141d7..d0337e9 100644
--- a/lisp/pdf-view.el
+++ b/lisp/pdf-view.el
@@ -331,6 +331,10 @@ PNG images in Emacs buffers."
"-"))))
(write-region nil nil tempfile nil 'no-message)
(setq-local pdf-view--buffer-file-name tempfile)))
+ ;; Decryption needs to be done before any other function calls into
+ ;; pdf-info.el (e.g. from the mode-line during redisplay during
+ ;; waiting for process output).
+ (pdf-view-decrypt-document)
;; Setup scroll functions
(if (boundp 'mwheel-scroll-up-function) ; not --without-x build
@@ -393,9 +397,6 @@ PNG images in Emacs buffers."
'pdf-view-new-window-function nil t)
(image-mode-setup-winprops)
- ;; Decryption needs to be done before any other function calls into
- ;; pdf-info.el .
- (pdf-view-decrypt-document)
;; Issue a warning in the future about incompatible modes.
(run-with-timer 1 nil #'pdf-view-check-incompatible-modes
(current-buffer))