From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hendy Subject: Re: Ditaa and babel goofing again? Date: Wed, 1 Sep 2010 17:17:27 -0500 Message-ID: References: <4C7EC572.3010100@ccbr.umn.edu> <4C7ECE0A.1030000@ccbr.umn.edu> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1865430665==" Return-path: Received: from [140.186.70.92] (port=54222 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OqvcZ-0000KT-GV for emacs-orgmode@gnu.org; Wed, 01 Sep 2010 18:17:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OqvcW-0008G0-Q3 for emacs-orgmode@gnu.org; Wed, 01 Sep 2010 18:17:31 -0400 Received: from mail-ew0-f41.google.com ([209.85.215.41]:48236) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OqvcW-0008Fc-BW for emacs-orgmode@gnu.org; Wed, 01 Sep 2010 18:17:28 -0400 Received: by ewy28 with SMTP id 28so5766843ewy.0 for ; Wed, 01 Sep 2010 15:17:27 -0700 (PDT) In-Reply-To: <4C7ECE0A.1030000@ccbr.umn.edu> 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: Erik Iverson , emacs-orgmode --===============1865430665== Content-Type: multipart/alternative; boundary=00148531b6a50eabca048f3a1070 --00148531b6a50eabca048f3a1070 Content-Type: text/plain; charset=ISO-8859-1 Okay, fixed it on a whim but clueless as to why this was the issue: 1) (setq org-ditaa-jar-path "~/.elisp/org.git/contrib/scripts/ditaa.jar") 2) (setq org-ditaa-jar-path "/home/jwhendy/.elisp/org.git/contrib/scripts/ditaa.jar") #1 *does not* work; #2 does! Should I have known this would be a problem or is there something else in .emacs that would cause this to require an explicit path vs. the abbreviation of ~ for /home/username? Thanks, John On Wed, Sep 1, 2010 at 5:04 PM, Erik Iverson wrote: > > > John Hendy wrote: > >> The weirdness builds: >> >> I get this in *Messages*: >> ----- >> For information about GNU Emacs and the GNU system, type C-h C-a. >> Making completion list... >> executing Ditaa code block... >> java -jar ~/.elisp/org.git/contrib/scripts/ditaa.jar >> /tmp/org-babel-ditaa5780zks ~/Desktop/example.png >> Unable to access jarfile ~/.elisp/org.git/contrib/scripts/ditaa.jar >> finished >> Auto-saving...done >> ----- >> >> But check this out: >> ----- >> [jwhendy@bigBang ~]$ ls -l ~/.elisp/org.git/contrib/scripts/ >> total 224 >> -rwxr-xr-x 1 jwhendy users 1013 Jul 19 16:26 dir2org.zsh >> -rwxr-xr-x 1 jwhendy users 210364 Jul 19 16:26 ditaa.jar >> -rwxr-xr-x 1 jwhendy users 3781 Jul 19 16:26 org2hpda >> -rw-r--r-- 1 jwhendy users 7340 Jul 19 16:26 StartOzServer.oz >> ----- >> >> How does /that/ work? To be fair, when I first did "ls -l" ditaa.jar was >> showing with only "-rw-r--r--" permissions which I think is really weird. I >> did a "sudo chmod +x" and you see the new result. >> >> > Those are my permissions to, and it works here, so that's presumably > not the problem. This sounds like something that someone will > immediately be able to diagnose, but unfortunately, it's not me. > > > One more oddity... I can do /this/ just fine: >> ----- >> [jwhendy@bigBang Desktop]$ java -jar >> ~/.elisp/org.git/contrib/scripts/ditaa.jar ./test.org >> >> >> DiTAA version 0.8, Copyright (C) 2004--2009 Efstathios Sideris >> >> Running with options: >> Reading file: ./test.org >> >> Locale: en_US >> Dialog.bold >> Rendering to file: /home/jwhendy/Desktop/./test.png >> Done in 1sec >> ----- >> >> I get a file test.png in the same director as test.org >> and it looks fine. It has the org src block text all over it, but the >> graphic was extracted perfectly. >> >> >> In both examples, the paths to ditaa are the same. Just to be sure (again) >> that I'm not taking crazy pills, I pasted the paths in .emacs and the >> straight ditaa command above into two separate files and ran diff and they >> are identical. Whew. >> >> I'm going to try a pull and see what happens. Maybe something got goofed >> along the way. No idea. I'll post back after that just to see if there's >> anything to that. Though my last post about this (referenced in my first >> email) was /after/ I pulled 7.01 (because the thread specifically references >> the new language in .emacs for babel support) so I'm almost sure I had all >> this working after my last pull. No idea what would have happened since >> then! >> >> >> John >> >> On Wed, Sep 1, 2010 at 4:28 PM, Erik Iverson > eriki@ccbr.umn.edu>> wrote: >> >> I see the following in my *Messages* buffer after running. >> >> executing Ditaa code block... >> java -jar >> /home/fileserv/tacc/eriki/emacs/lisp/org-mode/contrib/scripts/ditaa.jar >> /tmp/babel-31845pim/ditaa-318455Fo example.png >> >> DiTAA version 0.8, Copyright (C) 2004--2009 Efstathios Sideris >> >> Running with options: >> Reading file: /tmp/babel-31845pim/ditaa-318455Fo >> Locale: en_US >> Dialog.bold >> Rendering to file: example.png >> Done in 0sec >> >> Do you see something similar? >> >> Have you tried giving a full path to :file ?? Maybe the png >> is getting written somewhere you're not expecting. >> >> John Hendy wrote: >> >> Hi, >> >> >> See this post for reference: >> http://www.mail-archive.com/emacs-orgmode@gnu.org/msg27725.html >> >> With that issue, ditaa just wasn't cooperating for some reason. >> Now everything /appears/ to cooperate but I get no output! >> Completely baffled... >> >> Per the mailing list resolution above, I tried the exact same >> thing: >> - using the minimal.el file attached (with the path to my >> orgmode folder and ditaa path) >> - start emacs with "emacs -Q -l ~/path/to/minimal.el >> - C-c C-c on the #+begin_src line of this (the only thing in the >> .org file): >> >> #+begin_src ditaa :file example.png >> +---------------+ >> | | >> | ditaa example | >> | | >> +---------------+ >> #+end_src >> >> "Executing ditaa code block" flashes in the minibuffer, then >> "finished", and this is inserted into the file as one would expect: >> >> ---- >> #+results: >> file:example.png >> ---- >> >> but no example.png file is created! >> >> Just to check my sanity, I can create a file dit.txt with only >> this: >> >> +---------------+ >> | | >> | ditaa example | >> | | >> +---------------+ >> >> and run "java -jar ~/path/to/ditaa.jar dit.txt" and get an >> output picture just fine. The path in this command is the same >> as that in my .emacs config and in minimal.el attached... >> >> What in the world is going on?!? >> >> >> Thanks, >> John >> >> P.S. In case it's really something I'm overlooking here's a copy >> and paste straight from my .emacs file of my ditaa pertinent stuff: >> >> (setq org-ditaa-jar-path >> "~/.elisp/org.git/contrib/scripts/ditaa.jar") >> (org-babel-do-load-languages >> 'org-babel-load-languages >> '((ditaa . t) >> (gnuplot . t))) >> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> 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 >> >> >> --00148531b6a50eabca048f3a1070 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Okay, fixed it on a whim but clueless as to why this was the issue:
1)=A0(setq org-ditaa-jar-path "~/.elisp/org.git/contrib/sc= ripts/ditaa.jar")
2)=A0(setq org-ditaa-jar-path "/home/= jwhendy/.elisp/org.git/contrib/scripts/ditaa.jar")

#1 does not=A0work; #2 does!

Should I have known this would be a problem or is there something els= e in .emacs that would cause this to require an explicit path vs. the abbre= viation of ~ for /home/username?


Thanks,
John

On Wed, Sep 1, 2010 at 5:04 PM, Erik Iverson <eriki@ccbr.umn.ed= u> wrote:


John Hendy wrote:
The weirdness builds:

I get this in *Messages*:
-----
For information about GNU Emacs and the GNU system, type C-h C-a.
Making completion list...
executing Ditaa code block...
java -jar ~/.elisp/org.git/contrib/scripts/ditaa.jar =A0/tmp/org-babel-dita= a5780zks ~/Desktop/example.png
Unable to access jarfile ~/.elisp/org.git/contrib/scripts/ditaa.jar
finished
Auto-saving...done
-----

But check this out:
-----
[jwhendy@bigBang ~]$ ls -l ~/.elisp/org.git/contrib/scripts/
total 224
-rwxr-xr-x 1 jwhendy users =A0 1013 Jul 19 16:26 dir2org.zsh
-rwxr-xr-x 1 jwhendy users 210364 Jul 19 16:26 ditaa.jar
-rwxr-xr-x 1 jwhendy users =A0 3781 Jul 19 16:26 org2hpda
-rw-r--r-- 1 jwhendy users =A0 7340 Jul 19 16:26 StartOzServer.oz
-----

How does /that/ work? To be fair, when I first did "ls -l" ditaa.= jar was showing with only "-rw-r--r--" permissions which I think = is really weird. I did a "sudo chmod +x" and you see the new resu= lt.


Those are my permissions to, and it works here, so that's presumably not the problem. =A0This sounds like something that someone will
immediately be able to diagnose, but unfortunately, it's not me.


One more oddity... I can do /this/ just fine:
-----
[jwhendy@bigBang Desktop]$ java -jar ~/.elisp/org.git/contrib/scripts/ditaa= .jar ./test.org <http://test.org>


DiTAA version 0.8, Copyright (C) 2004--2009 =A0Efstathios Sideris

Running with options:
Reading file: ./test.org = <http://test.org>
Locale: en_US
Dialog.bold
Rendering to file: /home/jwhendy/Desktop/./test.png
Done in 1sec
-----

I get a file test.png in the same director as test.org <http://test.org> and it looks fine. It has the org src block te= xt all over it, but the graphic was extracted perfectly.


In both examples, the paths to ditaa are the same. Just to be sure (again) = that I'm not taking crazy pills, I pasted the paths in .emacs and the s= traight ditaa command above into two separate files and ran diff and they a= re identical. Whew.

I'm going to try a pull and see what happens. Maybe something got goofe= d along the way. No idea. I'll post back after that just to see if ther= e's anything to that. Though my last post about this (referenced in my = first email) was /after/ I pulled 7.01 (because the thread specifically ref= erences the new language in .emacs for babel support) so I'm almost sur= e I had all this working after my last pull. No idea what would have happen= ed since then!


John

On Wed, Sep 1, 2010 at 4:28 PM, Erik Iverson <eriki@ccbr.umn.edu <mailto:eriki@ccbr.umn.edu>>= wrote:

=A0 =A0I see the following in my *Messages* buffer after running.

=A0 =A0executing Ditaa code block...
=A0 =A0java -jar
=A0 =A0/home/fileserv/tacc/eriki/emacs/lisp/org-mode/contrib/scripts/ditaa= .jar
=A0 =A0 /tmp/babel-31845pim/ditaa-318455Fo example.png

=A0 =A0DiTAA version 0.8, Copyright (C) 2004--2009 =A0Efstathios Sideris
=A0 =A0Running with options:
=A0 =A0Reading file: /tmp/babel-31845pim/ditaa-318455Fo
=A0 =A0Locale: en_US
=A0 =A0Dialog.bold
=A0 =A0Rendering to file: example.png
=A0 =A0Done in 0sec

=A0 =A0Do you see something similar?

=A0 =A0Have you tried giving a full path to :file ?? Maybe the png
=A0 =A0is getting written somewhere you're not expecting.

=A0 =A0John Hendy wrote:

=A0 =A0 =A0 =A0Hi,


=A0 =A0 =A0 =A0See this post for reference:
=A0 =A0 =A0 =A0http://www.mail-archive.com/emacs-orgmod= e@gnu.org/msg27725.html

=A0 =A0 =A0 =A0With that issue, ditaa just wasn't cooperating for some= reason.
=A0 =A0 =A0 =A0Now everything /appears/ to cooperate but I get no output!<= br> =A0 =A0 =A0 =A0Completely baffled...

=A0 =A0 =A0 =A0Per the mailing list resolution above, I tried the exact sa= me thing:
=A0 =A0 =A0 =A0- using the minimal.el file attached (with the path to my =A0 =A0 =A0 =A0orgmode folder and ditaa path)
=A0 =A0 =A0 =A0- start emacs with "emacs -Q -l ~/path/to/minimal.el =A0 =A0 =A0 =A0- C-c C-c on the #+begin_src line of this (the only thing i= n the
=A0 =A0 =A0 =A0.org file):

=A0 =A0 =A0 =A0#+begin_src ditaa :file example.png
=A0 =A0 =A0 =A0 +---------------+
=A0 =A0 =A0 =A0 | =A0 =A0 =A0 =A0 =A0 =A0 =A0 |
=A0 =A0 =A0 =A0 | ditaa example |
=A0 =A0 =A0 =A0 | =A0 =A0 =A0 =A0 =A0 =A0 =A0 |
=A0 =A0 =A0 =A0 +---------------+
=A0 =A0 =A0 =A0#+end_src

=A0 =A0 =A0 =A0"Executing ditaa code block" flashes in the minib= uffer, then
=A0 =A0 =A0 =A0"finished", and this is inserted into the file as= one would expect:

=A0 =A0 =A0 =A0----
=A0 =A0 =A0 =A0#+results:
=A0 =A0 =A0 =A0file:example.png
=A0 =A0 =A0 =A0----

=A0 =A0 =A0 =A0but no example.png file is created!

=A0 =A0 =A0 =A0Just to check my sanity, I can create a file dit.txt with o= nly this:

=A0 =A0 =A0 =A0+---------------+
=A0 =A0 =A0 =A0 | =A0 =A0 =A0 =A0 =A0 =A0 =A0 |
=A0 =A0 =A0 =A0 | ditaa example |
=A0 =A0 =A0 =A0 | =A0 =A0 =A0 =A0 =A0 =A0 =A0 |
=A0 =A0 =A0 =A0 +---------------+

=A0 =A0 =A0 =A0and run "java -jar ~/path/to/ditaa.jar dit.txt" a= nd get an
=A0 =A0 =A0 =A0output picture just fine. The path in this command is the s= ame
=A0 =A0 =A0 =A0as that in my .emacs config and in minimal.el attached...
=A0 =A0 =A0 =A0What in the world is going on?!?


=A0 =A0 =A0 =A0Thanks,
=A0 =A0 =A0 =A0John

=A0 =A0 =A0 =A0P.S. In case it's really something I'm overlooking = here's a copy
=A0 =A0 =A0 =A0and paste straight from my .emacs file of my ditaa pertinen= t stuff:

=A0 =A0 =A0 =A0(setq org-ditaa-jar-path
=A0 =A0 =A0 =A0"~/.elisp/org.git/contrib/scripts/ditaa.jar")
=A0 =A0 =A0 =A0(org-babel-do-load-languages
=A0 =A0 =A0 =A0 'org-babel-load-languages
=A0 =A0 =A0 =A0 '((ditaa . t)
=A0 =A0 =A0 =A0 (gnuplot . t)))


=A0 =A0 =A0 =A0-----------------------------------------------------------= -------------

=A0 =A0 =A0 =A0_______________________________________________
=A0 =A0 =A0 =A0Emacs-orgmode mailing list
=A0 =A0 =A0 =A0Please use `Reply All' to send replies to the list.
=
=A0 =A0 =A0 =A0= Emacs-orgmode@gnu.org <mailto:Emacs-orgmode@gnu.org>

--00148531b6a50eabca048f3a1070-- --===============1865430665== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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 --===============1865430665==--