From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maurizio Vitale Subject: org-babel feature request Date: Sat, 10 Oct 2009 21:23:06 -0400 Message-ID: <873a5qyb9h.fsf@cuma.i-did-not-set--mail-host-address--so-tickle-me> Reply-To: maurizio.vitale@polymath-solutions.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mwn7K-0000iN-Ol for emacs-orgmode@gnu.org; Sat, 10 Oct 2009 21:20:58 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mwn7E-0000f2-L1 for emacs-orgmode@gnu.org; Sat, 10 Oct 2009 21:20:57 -0400 Received: from [199.232.76.173] (port=47348 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mwn7E-0000et-Dn for emacs-orgmode@gnu.org; Sat, 10 Oct 2009 21:20:52 -0400 Received: from lo.gmane.org ([80.91.229.12]:56875) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Mwn7E-0000xM-2x for emacs-orgmode@gnu.org; Sat, 10 Oct 2009 21:20:52 -0400 Received: from list by lo.gmane.org with local (Exim 4.50) id 1Mwn7B-00050o-T5 for emacs-orgmode@gnu.org; Sun, 11 Oct 2009 03:20:49 +0200 Received: from pool-72-95-245-39.pitbpa.east.verizon.net ([72.95.245.39]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 11 Oct 2009 03:20:49 +0200 Received: from maurizio.vitale by pool-72-95-245-39.pitbpa.east.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 11 Oct 2009 03:20:49 +0200 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: emacs-orgmode@gnu.org Thanks for the work on org-babel. I'm not sure the following is even mature enough in my mind to qualify it as a feature request. Maybe in the end it might be replaced by some other functionality that subsume it. But here's the scenario: I'd like to use org-babel for documenting the configuration and setup of my computing infrastructure. Up to now I've done it w/ plain org-mode, but having the documents being executable would be very nice. As a manner of example, let's take a fragment from my backup infrastructure: #+srcname: amanda_config_info #+begin_src sh for v in CLIENT_LOGIN CONFIG_DIR AMANDA_DBGDIR libexecdir listed_incr_dir; do echo -n $v sudo -u backup /usr/local/amanda/sbin/amadmin xx version|perl -ne "s,^.*\b$v=\"([^\"]+)\".*$, \1,g && print" done #+end_src #+resname: amanda_config_info | "CLIENT_LOGIN" | "backup" | | "CONFIG_DIR" | "/usr/local/amanda/etc/amanda" | | "AMANDA_DBGDIR" | "/tmp/amanda" | | "libexecdir" | "/usr/local/amanda/libexec" | | "listed_incr_dir" | "/usr/local/amanda/var/amanda/gnutar-lists" | It would be nice if it was possible to have multiple result sections. This way I could embed in the document the result that was obtained when writing the documentation, while still allowing the person following the recipe to evaluate again the shell script and get the results on his machine. The first section should be read-only (not necessarily physically read-only, but skipped by C-c C-c). The others may be re-evaluated over and over until the end user has a valid configuration. I'm not sure whether there's something more general than this, like attaching tags (that could be even elisp function) to result sections that do different things, one of which being enabling the section to receive results. Ok, I'm just bouncing ideas in case others see something useful. I've just started using org-babel and maybe I'll see different ways for achieving this. Thanks again for org-babel, Maurizio