From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: [Babel] why did ob-ditaa generate image file fail in orgmode? Date: Wed, 16 Mar 2011 09:31:35 -0600 Message-ID: <87wrjz3wvc.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from [140.186.70.92] (port=39166 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PzshL-0001fd-CT for emacs-orgmode@gnu.org; Wed, 16 Mar 2011 11:31:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PzshK-00079y-67 for emacs-orgmode@gnu.org; Wed, 16 Mar 2011 11:31:43 -0400 Received: from mail-qw0-f41.google.com ([209.85.216.41]:43635) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PzshK-00079t-3n for emacs-orgmode@gnu.org; Wed, 16 Mar 2011 11:31:42 -0400 Received: by qwa26 with SMTP id 26so1803662qwa.0 for ; Wed, 16 Mar 2011 08:31:41 -0700 (PDT) In-Reply-To: (Eric Luo's message of "Wed, 16 Mar 2011 22:19:43 +0800") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eric Luo Cc: emacs-orgmode@gnu.org Eric Luo 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