From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: Error running ditaa Date: Mon, 13 Dec 2010 12:45:47 -0700 Message-ID: <87bp4pihhw.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from [140.186.70.92] (port=44238 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PSELc-00089f-4F for emacs-orgmode@gnu.org; Mon, 13 Dec 2010 14:46:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PSELL-0001kh-HG for emacs-orgmode@gnu.org; Mon, 13 Dec 2010 14:46:11 -0500 Received: from mail-gx0-f180.google.com ([209.85.161.180]:47295) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PSELL-0001k9-EU for emacs-orgmode@gnu.org; Mon, 13 Dec 2010 14:45:55 -0500 Received: by gxk19 with SMTP id 19so4322965gxk.39 for ; Mon, 13 Dec 2010 11:45:54 -0800 (PST) In-Reply-To: (Dov Grobgeld's message of "Tue, 23 Nov 2010 16:27:55 +0200") 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: Dov Grobgeld Cc: emacs-orgmode@gnu.org Hi Dov, I agree with your point that the ditaa and dot aspects of org-export-blocks could be fruitfully refactored, however those parts of org-export-blocks are nearly deprecated and are only retained for backwards compatibility. Please use code blocks [1] for a more interactive and powerful means of evaluating and exporting dot and ditaa (and many other) blocks of code. Thanks -- Eric Dov Grobgeld writes: > When running ditaa on Linux fedora 12 through java, I get the following > errors: > > java -jar /usr/share/java/ditaa.jar -r -S /tmp/org-ditaa27392h-V > blue_fd02b5c06d6a5cb80eaf27098c3c490dc81326ce.png > Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on > Exception in thread "main" java.lang.NoClassDefFoundError: > org/apache/commons/cli/ParseException > Caused by: java.lang.ClassNotFoundException: > org.apache.commons.cli.ParseException > at java.net.URLClassLoader$1.run(URLClassLoader.java:217) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:205) > at java.lang.ClassLoader.loadClass(ClassLoader.java:319) > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) > at java.lang.ClassLoader.loadClass(ClassLoader.java:264) > at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:332) > Could not find the main class: > org.stathissideris.ascii2image.core.CommandLineConverter. Program will exit. > > This can be taken care of by using the shell script that comes with ditaa, > i.e.: > > ditaa -r -S /tmp/org-ditaa27392h-V > > But to do this from within emacs I need to patch org-exp-blocks.el as > follows: > > - (unless (file-exists-p org-ditaa-jar-path) > - (error (format "Could not find ditaa.jar at %s" org-ditaa-jar-path))) > : > - (message (concat "java -jar " org-ditaa-jar-path " " args " " > data-file " " out-file)) > - (shell-command (concat "java -jar " org-ditaa-jar-path " " args " " > data-file " " out-file))) > + (message (concat "ditaa " args " " data-file " " out-file)) > + (shell-command (concat "ditaa " args " " data-file " " out-file))) > > (You also need to erase the checking for the existance of dita.jar) > > Wouldn't it make more sense to replace the variable org-ditaa-jar-path with > a new variable org-ditaa-command that by default contains "java -jar > /old/value/of/org-ditaa-jar-path"? This would allow replacing it with a > shell script. Would a patch be accepted, or do you prefer to remain backward > compatible? > > On a related question. Since there is quite a lot of common code between > org-export-blocks-format-dot and org-export-blocks-format-ditaa (especially > if my patch is accepted), wouldn't it make sense to create a > org-export-blocks-format-meta that take all the differences between the > various export-blocks as parameters? This would simplify adding additional > org-export-blocks. > > Regards, > Dov > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode Footnotes: [1] http://orgmode.org/manual/Working-With-Source-Code.html