From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: [RFC] new :post header argument for post-processing of code block results Date: Tue, 16 Apr 2013 09:23:19 -0600 Message-ID: <87mwsycxaa.fsf@gmail.com> References: <87bo9zoxqd.fsf@gmail.com> <87y5ci8wwu.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:56091) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1US7mB-0002SY-8s for emacs-orgmode@gnu.org; Tue, 16 Apr 2013 11:26:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1US7m9-0000HA-4Y for emacs-orgmode@gnu.org; Tue, 16 Apr 2013 11:26:31 -0400 Received: from mail-pa0-f54.google.com ([209.85.220.54]:45015) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1US7m8-0000Gs-Ux for emacs-orgmode@gnu.org; Tue, 16 Apr 2013 11:26:29 -0400 Received: by mail-pa0-f54.google.com with SMTP id fa11so405513pad.13 for ; Tue, 16 Apr 2013 08:26:28 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org Mode Mailing List --=-=-= Content-Type: text/plain Eric S Fraga writes: > Eric Schulte 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. --=-=-= Content-Type: text/x-org Content-Disposition: inline; filename=post-chain.org #+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 --=-=-= Content-Type: text/plain -- Eric Schulte http://cs.unm.edu/~eschulte --=-=-=--