From mboxrd@z Thu Jan 1 00:00:00 1970 From: Karl Voit Subject: Re: Process diagrams with dot and some glue using Org-mode Date: Fri, 28 Jun 2013 11:20:44 +0200 Message-ID: <2013-06-28T11-15-09@devnull.Karl-Voit.at> References: <2013-06-26T17-08-48@devnull.Karl-Voit.at> <5b90a6852c7b87d077016cbb0479ff23@mail.rickster.com> <2013-06-26T18-59-53@devnull.Karl-Voit.at> <4c174089656ce0b08177f464325c4bf9@mail.rickster.com> Reply-To: news1142@Karl-Voit.at Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47895) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UsUrW-0007hN-2t for emacs-orgmode@gnu.org; Fri, 28 Jun 2013 05:21:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UsUrU-0007FR-QM for emacs-orgmode@gnu.org; Fri, 28 Jun 2013 05:21:02 -0400 Received: from plane.gmane.org ([80.91.229.3]:46549) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UsUrU-0007FL-Jg for emacs-orgmode@gnu.org; Fri, 28 Jun 2013 05:21:00 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UsUrP-0006Za-Jz for emacs-orgmode@gnu.org; Fri, 28 Jun 2013 11:20:55 +0200 Received: from mail.michael-prokop.at ([88.198.6.110]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 28 Jun 2013 11:20:55 +0200 Received: from news1142 by mail.michael-prokop.at with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 28 Jun 2013 11:20:55 +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: emacs-orgmode@gnu.org * Rick Frankel wrote: > And here's a simplier version which uses a graph table in the > following format: [...] I tried to use your solution with the "#+call:" method. Unfortunately, it fails and due to my limited ELISP knowledge, I can not debug this issue. I've got the feeling that you might be able to spot my error right away. I should add, that this is my first usage of "call:". So there might be a misunderstanding on my side on how to use it properly: #+name: graph-from-table #+HEADER: :var nodes=foobar-node-table graph=foobar-graph #+BEGIN_SRC emacs-lisp :file ~/tmp/2del/foovar-example-simple.png :colnames yes :exports results (org-babel-execute:dot (concat "digraph {\n" (mapconcat (lambda (x) (format "%s [label=\"%s\" shape=%s fillcolor=%s]" (car x) (nth 1 x) (if (string= "" (nth 2 x)) "box" (nth 2 x)) (if (string= "" (nth 3 x)) "none" (nth 3 x)))) nodes "\n") "\n" (mapconcat (lambda (x) (format "%s -> %s [taillabel=\"%s\"]" (car x) (nth 1 x) (nth 2 x))) graph "\n") "}\n") params) #+END_SRC #+name: example-node-table | *node* | *label* | *shape* | *fillcolor* | |------------+------------------------+---------+-------------| | S_start | example start | ellipse | green | | S_fill | example fill form | | | | S_send | example send form | | | | S_complete | example form complete? | diamond | yellow | | S_do | example do task | | red | | S_end | example end | ellipse | | #+name: example-graph | from | to | label | |------------+------------+-------| | S_start | S_fill | | | S_fill | S_send | | | S_send | S_complete | | | S_complete | S_fill | N | | S_complete | S_do | Y | | S_do | S_end | | #+call: graph-from-table(nodes=example-node-table,graph=example-graph) -> this results in "format: Wrong type argument: listp, hline" Note: I got the following additional parameters "in my pipeline" (want to make them work) as well: :exports results :resname example-result :file ~/tmp/2del/example-simple.png -- mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode: > get Memacs from https://github.com/novoid/Memacs < https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github