emacs-diffs
[Top][All Lists]
Advanced

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

master ec5433f: * lisp/doc-view.el (doc-view--revert-buffer): Fix last c


From: Stefan Monnier
Subject: master ec5433f: * lisp/doc-view.el (doc-view--revert-buffer): Fix last change
Date: Tue, 5 Nov 2019 14:33:41 -0500 (EST)

branch: master
commit ec5433f676035a5ad3ad8fcb22884cf0e0c290f6
Author: Stefan Monnier <address@hidden>
Commit: Stefan Monnier <address@hidden>

    * lisp/doc-view.el (doc-view--revert-buffer): Fix last change
---
 lisp/doc-view.el | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/lisp/doc-view.el b/lisp/doc-view.el
index d881507..15a1dc3 100644
--- a/lisp/doc-view.el
+++ b/lisp/doc-view.el
@@ -451,9 +451,13 @@ Typically \"page-%s.png\".")
                         (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))))
+                        ;; rendering (bug#26996).
+                        (unless (equal buffer-file-name
+                                       doc-view--buffer-file-name)
+                          ;; FIXME: Lars says he needed to recreate
+                          ;; the dir, we should figure out why.
+                          (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]