emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: ditaa breaks export [7.8.03]
@ 2012-02-28 23:40 Ian Dalton
  2012-02-29 12:39 ` Thomas Holst
  0 siblings, 1 reply; 3+ messages in thread
From: Ian Dalton @ 2012-02-28 23:40 UTC (permalink / raw)
  To: emacs-orgmode

Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

     http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org-mode mailing list.
------------------------------------------------------------------------

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

current state:
==============
(setq
 org-export-blocks '((src org-babel-exp-src-block nil)
                     (comment org-export-blocks-format-comment t)
                     (ditaa org-export-blocks-format-ditaa nil)
                     (dot org-export-blocks-format-dot nil))
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point
org-babel-execute-safely-maybe)
 org-export-preprocess-before-selecting-backend-code-hook
'(org-beamer-select-beamer-code)
 org-tab-first-hook '(org-hide-block-toggle-maybe
org-src-native-tab-command-maybe)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
                  org-cycle-show-empty-lines
                  org-optimize-window-after-visibility-change)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-speed-command-hook '(org-speed-command-default-hook
                          org-babel-speed-command-hook)
 org-babel-pre-tangle-hook '(save-buffer)
 org-occur-hook '(org-first-headline-recenter)
 org-export-interblocks '((lob org-babel-exp-lob-one-liners)
                          (src org-babel-exp-inline-src-blocks))
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-export-latex-format-toc-function 'org-export-latex-format-toc-default
 org-export-preprocess-before-normalizing-links-hook
'(org-remove-file-link-modifiers)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-export-first-hook '(org-beamer-initialize-open-trackers)
 org-mode-hook '(#[nil "\300\301\302\303\304$\207"
                   [org-add-hook change-major-mode-hook
org-show-block-all append
                    local]
                   5]
                 org-babel-hide-all-hashes)
 org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc
                               org-beamer-auto-fragile-frames
                               org-beamer-place-default-actions-for-lists)
 org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
                     org-src-mode-configure-edit-buffer)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-confirm-shell-link-function 'yes-or-no-p
 )
-- 
Ian Dalton
Philosophy Undergraduate, SUU
408-838-4797 ~ http://www.linkedin.com/in/idalton

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Bug: ditaa breaks export [7.8.03]
  2012-02-28 23:40 Bug: ditaa breaks export [7.8.03] Ian Dalton
@ 2012-02-29 12:39 ` Thomas Holst
  2012-02-29 16:30   ` Eric Schulte
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Holst @ 2012-02-29 12:39 UTC (permalink / raw)
  To: Ian Dalton; +Cc: emacs-orgmode

Hello orgers,

· Ian Dalton <iain.dalton@gmail.com> 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':

- in =lisp/ob-ditaa.el=:
  #+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.
  
- in =lisp/org-exp-blocks.el=
  #+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 "<path-to-ditaa-jar>")
#+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
-- 
Mit freundlichen Grüßen / Best regards 

Thomas

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Bug: ditaa breaks export [7.8.03]
  2012-02-29 12:39 ` Thomas Holst
@ 2012-02-29 16:30   ` Eric Schulte
  0 siblings, 0 replies; 3+ messages in thread
From: Eric Schulte @ 2012-02-29 16:30 UTC (permalink / raw)
  To: Thomas Holst; +Cc: Ian Dalton, emacs-orgmode

Thomas Holst <thomas.holst@de.bosch.com> writes:

> Hello orgers,
>
> · Ian Dalton <iain.dalton@gmail.com> 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 =lisp/ob-ditaa.el=:
>   #+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.
>   
> - in =lisp/org-exp-blocks.el=
>   #+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 "<path-to-ditaa-jar>")
> #+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

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-02-29 18:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-28 23:40 Bug: ditaa breaks export [7.8.03] Ian Dalton
2012-02-29 12:39 ` Thomas Holst
2012-02-29 16:30   ` Eric Schulte

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).