From mboxrd@z Thu Jan 1 00:00:00 1970 From: tsd@tsdye.com (Thomas S. Dye) Subject: Re: babel work flow Date: Thu, 14 Jul 2011 05:53:37 -1000 Message-ID: References: <80oc0x9uyz.fsf@somewhere.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([140.186.70.92]:33227) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QhOEa-0004Us-2v for emacs-orgmode@gnu.org; Thu, 14 Jul 2011 11:53:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QhOEV-00037j-Kl for emacs-orgmode@gnu.org; Thu, 14 Jul 2011 11:53:51 -0400 Received: from oproxy7-pub.bluehost.com ([67.222.55.9]:57870) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1QhOEU-00037K-Sc for emacs-orgmode@gnu.org; Thu, 14 Jul 2011 11:53:47 -0400 In-Reply-To: <80oc0x9uyz.fsf@somewhere.org> (Sebastien Vauban's message of "Thu, 14 Jul 2011 09:34:12 +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: Sebastien Vauban Cc: Org-mode "Sebastien Vauban" writes: > Hi Thomas, > > Thomas S. Dye wrote: >> I want to use one of the dot utilities, tred, in a way that preserves my >> ability to distribute the Org-mode file as reproducible research, i.e., >> intermediate results should end up in the Org-mode file or be passed >> along in a chain. >> >> Right now I have a python routine that reads a couple of Org-mode tables >> and outputs a valid dot graph. I'm saving this to a file, dot-temp.gv, >> and then running some shell commands, like this: >> >> #+begin_src sh >> tred dot-temp.gv > test.gv >> dot -o test.pdf -Tpdf test.gv >> open test.pdf >> #+end_src >> >> The graph is just what I want, but I can't see how to automate the >> process in Org-mode. In particular, the tred step trips me up. Do I >> have to make babel, tred-aware? > > Sorry if I misunderstand, but could you be more explicit (for me) on what the > problem is? Why is it a problem for you to have that sh block inside your > Org. It is executed automagically upon exporting, no? If yes, why is that not > good enough? > > Best regards, > Seb Aloha Seb, Yes, babel is working fine and the sh block does its job. The problem is that I like to see intermediate results in the Org-mode file and the sh block works instead with files that reside outside Org-mode. In this particular case, I'd prefer to have dot-temp.gv in a results block in the Org-mode file, and then pass this results block into a source code block where tred can manipulate it, and which returns its results to the Org-mode file. That way, the skeptical inquirer need only consult the Org-mode file to be convinced that tred removed the transitive relations from the digraph. It would be an easy matter to compare the two results blocks. All the best, Tom -- Thomas S. Dye http://www.tsdye.com