1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-26 07:33:39 +00:00

un-duplicate ditaa eps file name generation

* lisp/ob-ditaa.el (org-babel-execute:ditaa): Un-duplicate ditaa eps
  file name generation.
This commit is contained in:
Eric Schulte 2014-06-06 12:21:56 -04:00
parent 11ffc4f80e
commit 0ba8b4f2ea

View File

@ -90,11 +90,13 @@ This function is called by `org-babel-execute-src-block'."
(java (cdr (assoc :java params)))
(in-file (org-babel-temp-file "ditaa-"))
(eps (cdr (assoc :eps params)))
(eps-file (when eps
(org-babel-process-file-name (concat in-file ".eps"))))
(pdf-cmd (when (and (or (string= (file-name-extension out-file) "pdf")
(cdr (assoc :pdf params))))
(concat
"epstopdf"
" " (org-babel-process-file-name (concat in-file ".eps"))
" " eps-file
" -o=" (org-babel-process-file-name out-file))))
(cmd (concat org-babel-ditaa-java-cmd
" " java " " org-ditaa-jar-option " "
@ -104,7 +106,7 @@ This function is called by `org-babel-execute-src-block'."
" " cmdline
" " (org-babel-process-file-name in-file)
" " (if pdf-cmd
(org-babel-process-file-name (concat in-file ".eps"))
eps-file
(org-babel-process-file-name out-file)))))
(unless (file-exists-p org-ditaa-jar-path)
(error "Could not find ditaa.jar at %s" org-ditaa-jar-path))