From mboxrd@z Thu Jan 1 00:00:00 1970 From: Karl Voit Subject: Process diagrams with dot and some glue using Org-mode Date: Wed, 26 Jun 2013 17:23:03 +0200 Message-ID: <2013-06-26T17-08-48@devnull.Karl-Voit.at> 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]:42096) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrrYz-0008PV-Ov for emacs-orgmode@gnu.org; Wed, 26 Jun 2013 11:23:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UrrYx-0007Sx-LC for emacs-orgmode@gnu.org; Wed, 26 Jun 2013 11:23:17 -0400 Received: from plane.gmane.org ([80.91.229.3]:44551) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrrYx-0007Sm-BD for emacs-orgmode@gnu.org; Wed, 26 Jun 2013 11:23:15 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UrrYv-0000dY-U1 for emacs-orgmode@gnu.org; Wed, 26 Jun 2013 17:23:13 +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 ; Wed, 26 Jun 2013 17:23:13 +0200 Received: from news1142 by mail.michael-prokop.at with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 26 Jun 2013 17:23:13 +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 Hi! I was looking for a reasonable simple method to define processes and work-flows within Org-mode. My research did not result in anything existing I found useful. Therefore, I started to read about dot[1] and found [2]. I would like to define my diagram with the following two tables: one for the node definitions and one for the interconnections between notes. The syntax should be pretty self-explanatory (or at least I hope so): #+name: foobar-node-table | *node* | *label* | *shape* | *fillcolor* | |------------+----------------+---------+-------------| | S_start | start | ellipse | green | | S_fill | fill form | | | | S_send | send form | | | | S_complete | form complete? | diamond | yellow | | S_do | do task | | red | | S_end | end | ellipse | | #+name: foobar-graph-table | | S_start | S_fill | S_send | S_complete | S_do | S_end | | S_start | | - | | | | | | S_fill | | | > | | | | | S_send | | | | > | | | | S_complete | | N> | | | Y> | | | S_do | | | | | | > | | S_end | | | | | | | Some (still missing) glue should use these two tables and automatically generate the dot script: #+BEGIN_SRC dot :file ~/test-dot.png :exports results digraph { //rankdir=LR; S_start [label ="start", shape = "ellipse", style=filled, fillcolor="green"]; S_fill [label ="fill form", shape = "box"]; S_send [label ="send form", shape = "box"]; S_complete [label ="form complete?", shape = "diamond", style=filled, fillcolor="yellow"]; S_do [label ="do task", shape = "box", style=filled, fillcolor="red"]; S_end [label ="end", shape = "ellipse"]; S_start -- S_fill; S_fill -> S_send; S_send -> S_complete; S_complete -> S_do [taillabel = "Y"]; S_do -> S_end; S_complete -> S_fill [taillabel = "N"]; } #+END_SRC The question is: is somebody with decent ELISP knowledge able to implement the missing method? :-) I (not an ELISP hacker) would have to use Python and write a table parsing class which will get too complicated for my taste :-( However, my guess is that this could be implemented in ELISP with much less effort. I would be happy to document this method and provide it on Worg. In my opinion, this would be very handy for many Org-mode users. Thanks! 1. https://en.wikipedia.org/wiki/DOT_language 2. http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-dot.html -- 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