emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <nicholas.dokos@hp.com>
To: Herbert Sitz <hsitz@nwlink.com>
Cc: nicholas.dokos@hp.com, emacs-orgmode@gnu.org
Subject: Re: Problem with ditaa when doing export from command line
Date: Fri, 10 Jun 2011 12:21:47 -0400	[thread overview]
Message-ID: <6075.1307722907@alphaville.americas.hpqcorp.net> (raw)
In-Reply-To: Message from Herbert Sitz <hsitz@nwlink.com> of "Fri, 10 Jun 2011 15:47:00 -0000." <loom.20110610T173426-53@post.gmane.org>

Herbert Sitz <hsitz@nwlink.com> 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

  parent reply	other threads:[~2011-06-10 17:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-10  7:33 Problem with ditaa when doing export from command line Herbert Sitz
2011-06-10  7:52 ` Carsten Dominik
2011-06-10 15:47   ` Herbert Sitz
2011-06-10 15:59     ` Herbert Sitz
2011-06-10 16:21     ` Nick Dokos [this message]
2011-06-10 19:18       ` Herbert Sitz
2011-06-10 19:42         ` Nick Dokos
2011-06-10 20:54           ` Herbert Sitz

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=6075.1307722907@alphaville.americas.hpqcorp.net \
    --to=nicholas.dokos@hp.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=hsitz@nwlink.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public 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).