emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 9d7fae5: Fix reverting doc-view buffers


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master 9d7fae5: Fix reverting doc-view buffers
Date: Sun, 29 Sep 2019 08:58:49 -0400 (EDT)

branch: master
commit 9d7fae5ab198f7f33ebb3e791475b4e1a0082f61
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    Fix reverting doc-view buffers
    
    * lisp/doc-view.el (doc-view--revert-buffer): Actually use the new
    version of the PDF data (bug#26996).
---
 lisp/doc-view.el | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/lisp/doc-view.el b/lisp/doc-view.el
index 9d10d03..9fe177a 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]