Eric Luo <eric.we...@gmail.com> writes: > Hi, I have the following snippet in one of my org files, and have the > babel settings as following: > > ,---- > | (setq org-ditaa-jar-path > | "~/.emacs.d/org-mode/contrib/scripts/ditaa.jar") > | (org-babel-do-load-languages > | 'org-babel-load-languages (quote ((emacs-lisp . t) > | (dot . t) > | (ditaa . t) > | (R . t)))) > `---- > > when I evaluated the snippet, > ,---- > | > | executing Ditaa code block... java -jar > | /Users/eric/.emacs.d/org-mode/contrib/scripts/ditaa.jar > | > /var/folders/7x/7x730t2UEpec6mgk8rHiyk\+\+\+TI/-Tmp-/babel-777G0f/ditaa-777shg > | /Users/eric/test.png > | > | ditaa version 0.9, Copyright (C) 2004--2009 Efstathios (Stathis) Sideris > | > | Running with options: Reading file: > | /var/folders/7x/7x730t2UEpec6mgk8rHiyk+++TI/-Tmp-/babel-777G0f/ditaa-777shg > | Locale: zh_CN Dialog Rendering to file: /Users/eric/test.png Done in > | 1sec Code block evaluation complete. > `---- >
That is strange, there should be no difference between a shell command run by Emacs or by hand. If you copy the above directly from your *messages* buffer into a shell, then the invocation works? Are those newlines inserted by your email client, or are there really newlines embedded into the ditaa command line? Meaning is Emacs trying to execute this | /Users/eric/.emacs.d/org-mode/contrib/scripts/ditaa.jar | /var/folders/7x/7x730t2UEpec6mgk8rHiyk\+\+\+TI/-Tmp-/babel-777G0f/ditaa-777shg | /Users/eric/test.png or this | /Users/eric/.emacs.d/org-mode/contrib/scripts/ditaa.jar /var/folders/7x/7x730t2UEpec6mgk8rHiyk\+\+\+TI/-Tmp-/babel-777G0f/ditaa-777shg /Users/eric/test.png Judging by your formatting I'd guess the former, which seems strange. Best -- Eric > > It seems successed, but when I open the test.png, it is said that this > file is corrupted. > > It's ok if I execute the commandline(java -jar ...) in the shell. It's > very strange, and tested in ubuntu and Mac OSX. > > Any clues, thanks