From mboxrd@z Thu Jan 1 00:00:00 1970 From: Benjamin Motz Subject: [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 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:46174) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SRPGO-0005vT-1Q for emacs-orgmode@gnu.org; Mon, 07 May 2012 10:50:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SRPGH-0001l0-IG for emacs-orgmode@gnu.org; Mon, 07 May 2012 10:50:11 -0400 Received: from plane.gmane.org ([80.91.229.3]:55868) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SRPGH-0001iX-Ay for emacs-orgmode@gnu.org; Mon, 07 May 2012 10:50:05 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1SRPGE-0004YV-BR for emacs-orgmode@gnu.org; Mon, 07 May 2012 16:50:02 +0200 Received: from majorana.uni-muenster.de ([128.176.202.75]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 07 May 2012 16:50:02 +0200 Received: from b.motz by majorana.uni-muenster.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 07 May 2012 16:50:02 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain 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 --=-=-= Content-Type: text/plain Content-Disposition: inline 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 --=-=-=--