[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Problem with ditaa when doing export from command line
From: |
Nick Dokos |
Subject: |
Re: [O] Problem with ditaa when doing export from command line |
Date: |
Fri, 10 Jun 2011 12:21:47 -0400 |
Herbert Sitz <address@hidden> wrote:
> Carsten Dominik <carsten.dominik <at> gmail.com> writes:
>
> > On Jun 10, 2011, at 9:33 AM, Herbert Sitz wrote:
> >
> > > I'm trying to do an export by calling emacs from the command line like so:
> > >
> > > emacs -batch --visit=myfilename --funcall org-export-as-html
> >
> > maybe you need to do
> >
> > emacs -batch --visit=myfilename --eval '(setq org-confirm-babel-evaluate
> > nil)'
> --funcall org-export-as-html
> >
>
> After adding the eval switch the export terminates shortly after starting. I
> get messages:
> ---------------------
> Adding c:/Program Files (x86)/Emacs/EmacsW32/lisp/ to load-path
> OVERVIEW
> End of file during parsing
> ---------------------
>
> Same message has happened in several files, doesn't matter whether there's
> ditaa
> code block in .org file or not. I also get basically same result if I load my
> .emacs file explicitly, although in that case I see some 'Loading . . .'
> messages before OVERVIEW and End of file message.
>
>
> > Also, note that when you run emacs with -batch, you init file is *not*
> evaluated, . . .
>
> Thanks for those tips, had forgotten about loading of settings, though .emacs
> was still getting loaded. . .
>
Works fine for me here, so there is probably a syntax error in the lisp
file(s) you load or the lisp code you eval - try using a minimal setup
file as shown below:
GNU Emacs 24.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.22.0) of
2011-04-13
Org-mode version 7.5 (baseline.273.g889a48)
I do
emacs -batch --visit=foo.org -l export.el --funcall org-export-as-html
with export.el containing the following:
--8<---------------cut here---------------start------------->8---
(setq org-confirm-babel-evaluate nil)
(require 'ob-ditaa)
(setq org-babel-temporary-directory "tmp")
(setq org-ditaa-jar-path "/home/nick/elisp/org-mode/contrib/scripts/ditaa.jar")
--8<---------------cut here---------------end--------------->8---
and foo.org containing the following:
--8<---------------cut here---------------start------------->8---
* Export a picture
Need to load ob-ditaa to execute these:
#+begin_src ditaa :file image.png :cmdline -r :exports both
+---------+
| cBLU |
| |
| +----+
| |cPNK|
| | |
+----+----+
#+end_src
#+results:
[[file:image.png]]
#+begin_src ditaa :file image2.png :cmdline -r :exports both
+--------+ +-------+ +-------+
| | --+ ditaa +--> | |
| Text | +-------+ |diagram|
|Document| |!magic!| | |
| {d}| | | | |
+---+----+ +-------+ +-------+
: ^
| Lots of work |
+-------------------------+
#+end_src
#+results:
[[file:image2.png]]
#+begin_src ditaa :file image3.png :cmdline -r :exports both
/--------\ /---------\
| cRED | <------------- | cBLU |
| page | | page |
| | | table |
\--------/ | |
| |
\---------/
#+end_src
#+results:
[[file:image3.png]]
--8<---------------cut here---------------end--------------->8---
Nick