emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Maurizio Vitale <mav@cuma.i-did-not-set--mail-host-address--so-tickle-me>
To: emacs-orgmode@gnu.org
Subject: org-babel feature request
Date: Sat, 10 Oct 2009 21:23:06 -0400	[thread overview]
Message-ID: <873a5qyb9h.fsf@cuma.i-did-not-set--mail-host-address--so-tickle-me> (raw)

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

#+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"

#+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,


             reply	other threads:[~2009-10-11  1:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-11  1:23 Maurizio Vitale [this message]
2009-10-11  2:45 ` org-babel feature request Dan Davison
2009-10-11  3:01   ` Maurizio Vitale
2009-10-11  4:32     ` Dan Davison
2009-10-11 14:05       ` Maurizio Vitale

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=873a5qyb9h.fsf@cuma.i-did-not-set--mail-host-address--so-tickle-me \
    --to=mav@cuma.i-did-not-set--mail-host-address--so-tickle-me \
    --cc=emacs-orgmode@gnu.org \
    --cc=maurizio.vitale@polymath-solutions.com \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).