[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [RFC] new :post header argument for post-processing of code bloc
From: |
Eric Schulte |
Subject: |
Re: [O] [RFC] new :post header argument for post-processing of code block results |
Date: |
Tue, 16 Apr 2013 09:23:19 -0600 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Eric S Fraga <address@hidden> writes:
> Eric Schulte <address@hidden> writes:
>
>> Hi,
>>
>> I've been wanting to add the ability to post-process the results of a
>> code block for some time, and some recent threads (e.g., [1] and [2])
>> could both have benefited from post-processing of code block output.
>
> [...]
>
>> Does this new header argument seem useful? Any suggestions for better
>> syntax which don't add too much conceptual or code complexity?
>
> Very useful indeed! I don't have a chance to try this out properly now
> but I know of several previous org files where this would have been very
> useful.
>
Great, I'm happy I wasn't the only one.
>
> One question: can one have a sequence of forward chained blocks with
> length > 2?
>
> Thanks,
> eric
Yes, this is now just part of the :var machinery.
#+Title: :post header example
#+name: mult
#+begin_src emacs-lisp :var in=0
(* 2 in)
#+end_src
#+name: add
#+begin_src emacs-lisp :var in=0
(+ 1 in)
#+end_src
Putting the previous two together we get.
#+begin_src emacs-lisp :post mult(add(*this*))
4
#+end_src
#+RESULTS:
: 10
--
Eric Schulte
http://cs.unm.edu/~eschulte