emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric Schulte <schulte.eric@gmail.com>
To: Org Mode Mailing List <emacs-orgmode@gnu.org>
Subject: Re: [RFC] new :post header argument for post-processing of code block results
Date: Tue, 16 Apr 2013 09:23:19 -0600	[thread overview]
Message-ID: <87mwsycxaa.fsf@gmail.com> (raw)
In-Reply-To: 87y5ci8wwu.fsf@ucl.ac.uk

[-- Attachment #1: Type: text/plain, Size: 835 bytes --]

Eric S Fraga <e.fraga@ucl.ac.uk> writes:

> Eric Schulte <schulte.eric@gmail.com> 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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: post-chain.org --]
[-- Type: text/x-org, Size: 286 bytes --]

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

[-- Attachment #3: Type: text/plain, Size: 46 bytes --]


-- 
Eric Schulte
http://cs.unm.edu/~eschulte

  reply	other threads:[~2013-04-16 15:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-01  1:17 [RFC] new :post header argument for post-processing of code block results Eric Schulte
2013-04-01  5:30 ` Aaron Ecay
2013-04-03 14:30   ` Eric Schulte
2013-04-04  2:18     ` Eric Schulte
2013-04-04  9:54       ` Bastien
2013-04-04 12:47         ` Eric Schulte
2013-04-04 12:54           ` Bastien
2014-12-12 16:37     ` Christian Nybø
2013-04-16 12:47 ` Eric S Fraga
2013-04-16 15:23   ` Eric Schulte [this message]
2013-04-16 20:42     ` Andreas Leha

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  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=87mwsycxaa.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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).