diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2019-09-29 14:58:38 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2019-09-29 14:58:38 +0200 |
commit | 9d7fae5ab198f7f33ebb3e791475b4e1a0082f61 (patch) | |
tree | 0c64f7d051f4201ff3e463582313691507d74926 | |
parent | c9af343448e890a80093db03dd9a70f55c0cbde3 (diff) | |
download | emacs-9d7fae5ab198f7f33ebb3e791475b4e1a0082f61.tar.gz |
Fix reverting doc-view buffers
* lisp/doc-view.el (doc-view--revert-buffer): Actually use the new
version of the PDF data (bug#26996).
-rw-r--r-- | lisp/doc-view.el | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/doc-view.el b/lisp/doc-view.el index 9d10d036285..9fe177a184a 100644 --- a/lisp/doc-view.el +++ b/lisp/doc-view.el @@ -448,7 +448,12 @@ Typically \"page-%s.png\".") (setq-local undo-outer-limit (* 2 (buffer-size)))) (cl-labels ((revert () (let ((revert-buffer-preserve-modes t)) - (apply orig-fun args)))) + (apply orig-fun args) + ;; Update the cached version of the pdf file, + ;; too. This is the one that's used when + ;; rendering. + (doc-view-make-safe-dir doc-view-cache-directory) + (write-region nil nil doc-view--buffer-file-name)))) (if (and (eq 'pdf doc-view-doc-type) (executable-find "pdfinfo")) ;; We don't want to revert if the PDF file is corrupted which |