From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: Bug: ditaa breaks export [7.8.03] Date: Wed, 29 Feb 2012 09:30:25 -0700 Message-ID: <87fwdtbo0u.fsf@gmx.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:41890) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2oLa-0004xc-GX for emacs-orgmode@gnu.org; Wed, 29 Feb 2012 13:34:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S2oLM-00070y-I9 for emacs-orgmode@gnu.org; Wed, 29 Feb 2012 13:33:54 -0500 Received: from mailout-us.gmx.com ([74.208.5.67]:58965) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1S2oLM-0006zv-Bh for emacs-orgmode@gnu.org; Wed, 29 Feb 2012 13:33:40 -0500 In-Reply-To: (Thomas Holst's message of "Wed, 29 Feb 2012 13:39:04 +0100") 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: Thomas Holst Cc: Ian Dalton , "emacs-orgmode@gnu.org" Thomas Holst writes: > Hello orgers, > > =C2=B7 Ian Dalton wrote: > >> When I run `emacs -q' and evaluate `(setq org-babel-load-languages >> '((ditaa . t)))', then try to export an org document to PDF, after >> answering yes to "Evaluate this ditaa code block", I get: >> >> Wrong type argument: stringp, nil >> >> Emacs : GNU Emacs 24.0.93.1 (i486-pc-linux-gnu, GTK+ Version 2.20.1) >> of 2012-02-22 on cw-bkp0, modified by Debian >> Package: Org-mode version 7.8.03 > > I can confirm this. > > A little investigation shows that there are two definitions for > `org-ditaa-jar-path': > Thanks for running down the cause of this problem and suggesting a fix. I've just applied your suggestion. The redundant definition is now removed from ob-ditaa and ob-ditaa requires org-exp-blocks. Cheers, > > - in =3Dlisp/ob-ditaa.el=3D: > #+begin_src emacs-lisp > (defcustom org-ditaa-jar-path nil > "Path for the ditaa jar file." > :group 'org-babel > :type 'string) > #+end_src > > This results in nil and so the error occurs. >=20=20=20 > - in =3Dlisp/org-exp-blocks.el=3D > #+begin_src emacs-lisp > (defvar org-ditaa-jar-path (expand-file-name > "ditaa.jar" > (file-name-as-directory > (expand-file-name > "scripts" > (file-name-as-directory > (expand-file-name > "../contrib" > (file-name-directory (or load-file-name buffer-file-name))))))) > "Path to the ditaa jar executable.") > #+end_src > > On my machine this results in the correct path. > > So the value of `org-ditaa-jar-path' depends on the loading sequence of > el-files. > > A quick solution for OP would be to the set the path > > #+begin_src emacs-lisp > (setq org-ditaa-jar-path "") > #+end_src > > I am not too deep into dependencies of org files, but ob-ditaa.el could > require org-exp-blocks and skip the definition of `org-ditaa-jar-path'. > Or vice versa. > > HTH --=20 Eric Schulte http://cs.unm.edu/~eschulte/