From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Weylandt Subject: Re: Out of Order Evaluation Date: Fri, 21 Mar 2014 14:51:22 -0400 Message-ID: <483B5140-8D74-426E-9F94-DEBD3531A77E@gmail.com> References: <8AE0B11E-8EA2-41A8-8D0C-CDB610785239@gmail.com> <87lhw4cyd5.fsf@med.uni-goettingen.de> Mime-Version: 1.0 (1.0) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55143) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WR4XY-0001EL-Nv for emacs-orgmode@gnu.org; Fri, 21 Mar 2014 14:51:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WR4XU-0006ek-Fg for emacs-orgmode@gnu.org; Fri, 21 Mar 2014 14:51:36 -0400 Received: from mail-qc0-x236.google.com ([2607:f8b0:400d:c01::236]:51441) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WR4XU-0006eU-9p for emacs-orgmode@gnu.org; Fri, 21 Mar 2014 14:51:32 -0400 Received: by mail-qc0-f182.google.com with SMTP id e16so3224430qcx.41 for ; Fri, 21 Mar 2014 11:51:31 -0700 (PDT) In-Reply-To: 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: Charles Berry Cc: "emacs-orgmode@gnu.org" On Mar 20, 2014, at 21:34, Charles Berry wrote: > Andreas Leha med.uni-goettingen.de> writes: > >> >> Hi Michael, >> >> Michael Weylandt gmail.com> writes: >> >>> Hi, >>> >>> I want to put a summary of my analysis at the beginning of a document >>> using results calculated at the end of the document. Is this possible? > > [snip] > >>> >>> Is this possible in a single pass? > > > Not quite. The method suggested by Andreas computes the result twice. If > there is any randomness in the results (as in the example) you will get a > different answer in the summary than when the block is later evaluated. > >>> I've played with #+NAME and >>> <> but haven't gotten the out-of-order evaluation quite >>> right. > > You can use > > #+results: the-mean > > before > > #+NAME: the-mean > #+begin_src R > mean(x) > #+end_src > > which is after 'theanalysis' block. > > And if the format is not pleasing add a filter that reformats the results Great. The named result block is just what I needed. > > IMO, needing ':exports results' for inline src blocks is a bug not a > feature. > Agreed, particularly in light of Eric's comments at http://lists.gnu.org/archive/html/emacs-orgmode/2014-03/msg00285.html There's the variable org-babel-inline-header-args, but it seems using #+PROPERTY: header-args :exports both overrules/breaks it Would org want something like #+PROPERTY: inline-header-args :exports results Or just 'hard-code' :exports results for all inline blocks?