From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Problem with ditaa when doing export from command line Date: Fri, 10 Jun 2011 12:21:47 -0400 Message-ID: <6075.1307722907@alphaville.americas.hpqcorp.net> References: <44422493-1A8F-43B6-8051-945C794DFA57@gmail.com> Reply-To: nicholas.dokos@hp.com Return-path: Received: from eggs.gnu.org ([140.186.70.92]:47630) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QV5Cq-0001Lz-Ur for emacs-orgmode@gnu.org; Fri, 10 Jun 2011 13:09:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QV5Cp-0002Vs-4G for emacs-orgmode@gnu.org; Fri, 10 Jun 2011 13:09:12 -0400 Received: from g4t0016.houston.hp.com ([15.201.24.19]:45146) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QV5Co-0002Ur-8U for emacs-orgmode@gnu.org; Fri, 10 Jun 2011 13:09:10 -0400 In-Reply-To: Message from Herbert Sitz of "Fri, 10 Jun 2011 15:47:00 -0000." List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Herbert Sitz Cc: nicholas.dokos@hp.com, emacs-orgmode@gnu.org Herbert Sitz wrote: > Carsten Dominik 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