[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] [patch] org-create-formula-image-with-dvipng (was: [bug] org-create-
From: |
Benjamin Motz |
Subject: |
[O] [patch] org-create-formula-image-with-dvipng (was: [bug] org-create-formula-image-with-dvipng fails to find temporary file) |
Date: |
Mon, 07 May 2012 16:49:46 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.95 (gnu/linux) |
Hello,
I have the same problem and resolved it with the appended
patch. Apparently, the .out-files aren't created and therefore can't be
deleted. The patch is checking for file-existence before trying to
delete.
Greetings, Benjamin
diff --git a/lisp/org.el b/lisp/org.el
index 16d2fe0..40fc646 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -17246,7 +17246,8 @@ inspection."
;; Use the requested file name and clean up
(copy-file pngfile tofile 'replace)
(loop for e in '(".dvi" ".tex" ".aux" ".log" ".png" ".out") do
- (delete-file (concat texfilebase e)))
+ (if (file-exists-p (concat texfilebase e))
+ (delete-file (concat texfilebase e))))
pngfile))))
(defvar org-latex-to-pdf-process) ;; Defined in org-latex.el