From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: Re: From state table to state diagram Date: Tue, 24 Aug 2010 18:33:45 -0600 Message-ID: <878w3vedfz.fsf@gmail.com> References: <4af92c2e-de26-4149-bd68-06fd6a0503f0@email.android.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=49686 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oo3yH-0002ZV-7a for emacs-orgmode@gnu.org; Tue, 24 Aug 2010 20:36:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oo3yF-0004GJ-TG for emacs-orgmode@gnu.org; Tue, 24 Aug 2010 20:36:05 -0400 Received: from mail-iw0-f169.google.com ([209.85.214.169]:60596) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oo3yF-0004Ft-Od for emacs-orgmode@gnu.org; Tue, 24 Aug 2010 20:36:03 -0400 Received: by mail-iw0-f169.google.com with SMTP id 33so83708iwn.0 for ; Tue, 24 Aug 2010 17:36:03 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Gary Cc: emacs-orgmode@gnu.org Babel does support generating diagrams with graphviz via "dot" code blocks. Babel is also capable of converting Org-mode tables to list objects in a number of languages, so I'd recommend writing a table->dot script in your favorite language, and then using babel to handle the coordination and Org-mode integration. I'm happy to help in this regard, the first step would be something like the following example which assumes python is your preferred scripting language (as you can see I have no idea what your state table may look like)... --8<---------------cut here---------------start------------->8--- #+results: state-table | 1 | 2 | | 3 | 4 | #+source: table-to-dot #+begin_src python :var table=state-table python code here #+end_src #+begin_src dot :var text=table-to-dot(table=state-table) graph{ $text } #+end_src --8<---------------cut here---------------end--------------->8--- Once this is working I think it could make a great addition to the library of babel [1] (a collection of generally useful code blocks). Cheers -- Eric Gary writes: > Eric S Fraga wrote: > >> Sorry, that should have been graphviz... typing on a phone. :-( > > :)) > > Okay, thanks. I know about graphviz, but it is not really what I am > looking for. Ideally I would create a state transition table and then > just "magically" get a diagram as a by-product. I can definitely see > that the DOT language might be a good target though - generating that > from a table should be easier than generating a diagram directly. > > Well, maybe it's a bit specific and nobody has done anything so I should > look into it on my own :) Footnotes: [1] http://orgmode.org/worg/org-contrib/babel/library-of-babel.php