emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Karl Voit <devnull@Karl-Voit.at>
To: emacs-orgmode@gnu.org
Subject: Re: Process diagrams with dot and some glue using Org-mode
Date: Fri, 28 Jun 2013 11:20:44 +0200	[thread overview]
Message-ID: <2013-06-28T11-15-09@devnull.Karl-Voit.at> (raw)
In-Reply-To: 4c174089656ce0b08177f464325c4bf9@mail.rickster.com

* Rick Frankel <rick@rickster.com> 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

  parent reply	other threads:[~2013-06-28  9:21 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-26 15:23 Process diagrams with dot and some glue using Org-mode Karl Voit
2013-06-26 15:41 ` Karl Voit
2013-06-26 15:44 ` Rick Frankel
2013-06-26 17:03   ` Karl Voit
2013-06-26 18:25     ` Rick Frankel
2013-06-27  6:47       ` Karl Voit
2013-06-27 13:06         ` Rick Frankel
2013-06-27 13:56           ` Bastien
2013-06-28  9:20       ` Karl Voit [this message]
2013-06-28 15:34         ` Rick Frankel
2013-07-01 17:44           ` Karl Voit
2013-06-26 16:40 ` Eric S Fraga
2013-06-27  6:56   ` Karl Voit
2013-06-26 16:54 ` Thorsten Jolitz
2013-06-27  6:36   ` Karl Voit
2013-07-03 19:18 ` Karl Voit
2013-07-03 20:57   ` Nick Dokos
2013-07-05 16:15   ` Eric S Fraga

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2013-06-28T11-15-09@devnull.Karl-Voit.at \
    --to=devnull@karl-voit.at \
    --cc=emacs-orgmode@gnu.org \
    --cc=news1142@Karl-Voit.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).