emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] org-babel feature request


From: Dan Davison
Subject: Re: [Orgmode] org-babel feature request
Date: Sun, 11 Oct 2009 00:32:02 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (gnu/linux)

Maurizio Vitale <address@hidden> writes:

>>>>>> "Dan" == Dan Davison <address@hidden> writes:
>
>     Dan> Maurizio Vitale
>     Dan> <address@hidden>
>     Dan> writes:
>
>     Dan> [...]
>
>     >> 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.
>
>     Dan> Hi Maurizio,
>
>     Dan> Once I've obtained the results that I want to "freeze", I would
>     Dan> manually alter (or even delete) the #+resname tag, so that the
>     Dan> source block no longer overwrites it. Is that simple solution
>     Dan> appropriate? I'm not yet seeing the advantage of the more
>     Dan> complex possibilities.
>
> That is the obvious possibility, but at times you may want to
> re-evaluate those: either the configuration has changed, or the software
> you're documenting has changed or the script you're using is buggy.
>
> Yes you could reintroduce the #+resname tag when needed, but I'm hoping
> to get more automation than M-x shell-command-on-region.

The other, perhaps nicer, thing you can do is change the #+srcname of
the block which has the effect of changing the results block. You can do
that now. But maybe we could allow the user to over-ride the default way
in which the #+resname tag is set? E.g. by adding a :resname header
argument.

Something like this:

--8<---------------cut here---------------start------------->8---
#+srcname: test2
#+begin_src sh :resname test2-redirected
  expr 2 + 3
#+end_src

#+resname: test2
: 4

#+resname: test2-redirected
: 5
--8<---------------cut here---------------end--------------->8---

Do you think that would be worthwhile?

Dan



>
> I've just started using org-babel in this way, so I'm not sure at all of
> what features I'll feel in the end needed. This seems one right now.
>
> Best regards,
>
>      Maurizio




reply via email to

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