emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Eric Schulte" <schulte.eric@gmail.com>
To: Eric Luo <eric.wenbl@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [Babel] why did ob-ditaa generate image file fail in orgmode?
Date: Wed, 16 Mar 2011 09:31:35 -0600	[thread overview]
Message-ID: <87wrjz3wvc.fsf@gmail.com> (raw)
In-Reply-To: <m2bp1b2lmo.fsf@gmail.com> (Eric Luo's message of "Wed, 16 Mar 2011 22:19:43 +0800")

Eric Luo <eric.wenbl@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

      parent reply	other threads:[~2011-03-16 15:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-16 14:19 Eric Luo
2011-03-16 14:39 ` Eric S Fraga
2011-03-16 14:53   ` Eric Luo
2011-03-16 15:06     ` Eric S Fraga
2011-03-17 14:27       ` Eric Luo
2011-03-16 15:31 ` Eric Schulte [this message]

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=87wrjz3wvc.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=eric.wenbl@gmail.com \
    --subject='Re: [Babel] why did ob-ditaa generate image file fail in orgmode?' \
    /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

Code repositories for project(s) associated with this 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).