From mboxrd@z Thu Jan 1 00:00:00 1970 From: tsd@tsdye.com (Thomas S. Dye) Subject: Re: graphviz dot block export and evaluate Date: Fri, 28 Sep 2012 07:14:15 -1000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:52428) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1THe8u-0003ZD-UO for emacs-orgmode@gnu.org; Fri, 28 Sep 2012 13:14:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1THe8s-00026D-NK for emacs-orgmode@gnu.org; Fri, 28 Sep 2012 13:14:24 -0400 Received: from oproxy6-pub.bluehost.com ([67.222.54.6]:44441) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1THe8s-00025l-Cd for emacs-orgmode@gnu.org; Fri, 28 Sep 2012 13:14:22 -0400 In-Reply-To: (Dmitri Makarov's message of "Fri, 28 Sep 2012 18:51:56 +0200") 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: Dmitri Makarov Cc: "emacs-orgmode@gnu.org" Dmitri Makarov 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