* graphviz dot block export and evaluate @ 2012-09-28 16:51 Dmitri Makarov 2012-09-28 17:07 ` Bastien 2012-09-28 17:14 ` Thomas S. Dye 0 siblings, 2 replies; 4+ messages in thread From: Dmitri Makarov @ 2012-09-28 16:51 UTC (permalink / raw) To: emacs-orgmode@gnu.org Hi all, Has anyone successfully exported and evaluated src blocks with graphviz dot code? I'm trying to export this block #+BEGIN_SRC dot :export both digraph G { A -> B } #+END_SRC and I'm getting the error org-babel-exp processing... executing Dot code block... file-name-extension: Wrong type argument: stringp, nil How do you debug such problems? Regards, Dmitri ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: graphviz dot block export and evaluate 2012-09-28 16:51 graphviz dot block export and evaluate Dmitri Makarov @ 2012-09-28 17:07 ` Bastien 2012-09-28 17:14 ` Thomas S. Dye 1 sibling, 0 replies; 4+ messages in thread From: Bastien @ 2012-09-28 17:07 UTC (permalink / raw) To: Dmitri Makarov; +Cc: emacs-orgmode@gnu.org Hi Dmitri, Dmitri Makarov <dmakarv@gmail.com> writes: > #+BEGIN_SRC dot :export both > digraph G { > A -> B > } > #+END_SRC You need a :file parameter: #+BEGIN_SRC dot :file test.png :export both digraph G { A -> B } #+END_SRC HTH, -- Bastien ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: graphviz dot block export and evaluate 2012-09-28 16:51 graphviz dot block export and evaluate Dmitri Makarov 2012-09-28 17:07 ` Bastien @ 2012-09-28 17:14 ` Thomas S. Dye 2012-09-28 17:27 ` Dmitri Makarov 1 sibling, 1 reply; 4+ messages in thread From: Thomas S. Dye @ 2012-09-28 17:14 UTC (permalink / raw) To: Dmitri Makarov; +Cc: emacs-orgmode@gnu.org Dmitri Makarov <dmakarv@gmail.com> writes: > Hi all, > > Has anyone successfully exported and evaluated src blocks with > graphviz dot code? > I'm trying to export this block > > #+BEGIN_SRC dot :export both > digraph G { > A -> B > } > #+END_SRC > > and I'm getting the error > > org-babel-exp processing... > executing Dot code block... > file-name-extension: Wrong type argument: stringp, nil > > How do you debug such problems? > > Regards, > > Dmitri Aloha Dmitri, Currently, you can debug such problems by looking at the source code of ob-dot.el. Or, by asking the list, as you did. Your example is lacking a :file header argument. dot source code blocks produce graphics files and babel leaves it to the user to name the output file. The file-name-extension function is looking for the value of the :file header argument, so that it can configure the call to dot. It is expecting to see a string, but gets nil because the header argument is absent. Also, the correct keyword is :exports, with a final "s". You can find an example of dot code use here: http://www.jstatsoft.org/v46/i03 hth, Tom -- Thomas S. Dye http://www.tsdye.com ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: graphviz dot block export and evaluate 2012-09-28 17:14 ` Thomas S. Dye @ 2012-09-28 17:27 ` Dmitri Makarov 0 siblings, 0 replies; 4+ messages in thread From: Dmitri Makarov @ 2012-09-28 17:27 UTC (permalink / raw) To: emacs-orgmode@gnu.org Hi Tom and Bastien, Thank you, your answers helped a lot. My fault that I used "export" not "exports" and that I didn't read the section Specific header arguments in the Org manual. Thanks! Dmitri On Sep 28, 2012, at 7:14 PM, tsd@tsdye.com (Thomas S. Dye) wrote: > Dmitri Makarov <dmakarv@gmail.com> writes: > >> Hi all, >> >> Has anyone successfully exported and evaluated src blocks with >> graphviz dot code? >> I'm trying to export this block >> >> #+BEGIN_SRC dot :export both >> digraph G { >> A -> B >> } >> #+END_SRC >> >> and I'm getting the error >> >> org-babel-exp processing... >> executing Dot code block... >> file-name-extension: Wrong type argument: stringp, nil >> >> How do you debug such problems? >> >> Regards, >> >> Dmitri > > Aloha Dmitri, > > Currently, you can debug such problems by looking at the source code of > ob-dot.el. Or, by asking the list, as you did. > > Your example is lacking a :file header argument. dot source code blocks > produce graphics files and babel leaves it to the user to name the > output file. The file-name-extension function is looking for the value > of the :file header argument, so that it can configure the call to dot. > It is expecting to see a string, but gets nil because the header > argument is absent. > > Also, the correct keyword is :exports, with a final "s". > > You can find an example of dot code use here: > http://www.jstatsoft.org/v46/i03 > > hth, > Tom > -- > Thomas S. Dye > http://www.tsdye.com ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-09-28 17:28 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-09-28 16:51 graphviz dot block export and evaluate Dmitri Makarov 2012-09-28 17:07 ` Bastien 2012-09-28 17:14 ` Thomas S. Dye 2012-09-28 17:27 ` Dmitri Makarov
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.