emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [bug] org-create-formula-image-with-dvipng fails to find temporary file
@ 2012-05-06  9:43 Maik Beckmann
  2012-05-07 14:49 ` [patch] org-create-formula-image-with-dvipng (was: [bug] org-create-formula-image-with-dvipng fails to find temporary file) Benjamin Motz
  0 siblings, 1 reply; 3+ messages in thread
From: Maik Beckmann @ 2012-05-06  9:43 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

Yesterday I've updated my git clone of org-mode after a few weeks of
not found time to.  I noticed the latex fragment preview (C-c C-x C-l)
broke.  I get messages like

    org-create-formula-image-with-dvipng: Removing old name: No such
file or directory, /tmp/orgtex17198KSG.out

Interestingly if another preview command is queued at the same the
same fragment that just failed, it works.  When run in a section
outside of any fragment, where previously all fragments in this
section would be rendered, it fails at the first run at the first
fragment, at the second run it renders it and fails at the second, at
the third run it renders it and fails at the third, and so on.

Just to be sure I've ran emacs -Q, evaluated (add-to-list 'load-path
"~/.emacs.d/org-mode/lisp") and opened a simple org file.  Same issue.

Right now I'm too short of time to dig into the code to figure out
what's going on, but I wanted bring it up anyways in case some of you
guys hit the same issue and search the mailing list for it.


Best,
Maik

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [patch] org-create-formula-image-with-dvipng (was: [bug] org-create-formula-image-with-dvipng fails to find temporary file)
  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
  2012-05-08 12:25   ` [patch] org-create-formula-image-with-dvipng Bastien
  0 siblings, 1 reply; 3+ messages in thread
From: Benjamin Motz @ 2012-05-07 14:49 UTC (permalink / raw)
  To: emacs-orgmode

[-- 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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [patch] org-create-formula-image-with-dvipng
  2012-05-07 14:49 ` [patch] org-create-formula-image-with-dvipng (was: [bug] org-create-formula-image-with-dvipng fails to find temporary file) Benjamin Motz
@ 2012-05-08 12:25   ` Bastien
  0 siblings, 0 replies; 3+ messages in thread
From: Bastien @ 2012-05-08 12:25 UTC (permalink / raw)
  To: Benjamin Motz; +Cc: emacs-orgmode

Hi Benjamin,

Benjamin Motz <b.motz@uni-muenster.de> writes:

> 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.

I applied your fix in two places -- see:

http://orgmode.org/w/?p=org-mode.git;a=commit;h=6b482c

Thanks,

-- 
 Bastien

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-05-08 12:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-06  9:43 [bug] org-create-formula-image-with-dvipng fails to find temporary file Maik Beckmann
2012-05-07 14:49 ` [patch] org-create-formula-image-with-dvipng (was: [bug] org-create-formula-image-with-dvipng fails to find temporary file) Benjamin Motz
2012-05-08 12:25   ` [patch] org-create-formula-image-with-dvipng Bastien

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).