emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] org-babel feature request


From: Maurizio Vitale
Subject: [Orgmode] org-babel feature request
Date: Sat, 10 Oct 2009 21:23:06 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]