Browse Source

org.el: Don't re-generate latex previews if already present

* org.el (org-format-latex): Do not re-generate a latex preview if the
image already exists.

This feature was lost in commit 27101a3e0ee7
Abdó Roig-Maranges 12 years ago
parent
commit
5954ba9a73
1 changed files with 3 additions and 2 deletions
  1. 3 2
      lisp/org.el

+ 3 - 2
lisp/org.el

@@ -17636,8 +17636,9 @@ Some of the options can be changed using the variable
 	      (unless checkdir ; make sure the directory exists
 		(setq checkdir t)
 		(or (file-directory-p todir) (make-directory todir t)))
-	      (org-create-formula-image
-	       txt movefile optnew forbuffer processing-type)
+	      (unless (file-exists-p movefile)
+		(org-create-formula-image
+		 txt movefile optnew forbuffer processing-type))
 	      (if overlays
 		  (progn
 		    (mapc (lambda (o)