emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Benjamin Motz <b.motz@uni-muenster.de>
To: emacs-orgmode@gnu.org
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	[thread overview]
Message-ID: <u13bkfwbcujud.fsf@majorana.uni-muenster.de> (raw)
In-Reply-To: CAL7baBxxBsTtS3AFXDB2-qkROPUaSVbE9nVB9Xzg44=t-gjwUQ@mail.gmail.com

[-- Attachment #1: Type: text/plain, Size: 235 bytes --]

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


[-- Attachment #2: Type: text/plain, Size: 510 bytes --]

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

  reply	other threads:[~2012-05-07 14:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-06  9:43 [bug] org-create-formula-image-with-dvipng fails to find temporary file Maik Beckmann
2012-05-07 14:49 ` Benjamin Motz [this message]
2012-05-08 12:25   ` [patch] org-create-formula-image-with-dvipng Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=u13bkfwbcujud.fsf@majorana.uni-muenster.de \
    --to=b.motz@uni-muenster.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).