From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Brand Subject: Re: Include results in a table Date: Tue, 28 Oct 2014 11:54:10 +0100 Message-ID: References: <544F5BA4.3090703@thierry-pelle.eu> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35947) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xj4Pn-0007jn-AP for emacs-orgmode@gnu.org; Tue, 28 Oct 2014 06:54:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xj4Pk-0003g0-4L for emacs-orgmode@gnu.org; Tue, 28 Oct 2014 06:54:15 -0400 Received: from mail-qa0-x232.google.com ([2607:f8b0:400d:c00::232]:34742) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xj4Pj-0003fh-Ok for emacs-orgmode@gnu.org; Tue, 28 Oct 2014 06:54:11 -0400 Received: by mail-qa0-f50.google.com with SMTP id cs9so233738qab.9 for ; Tue, 28 Oct 2014 03:54:10 -0700 (PDT) In-Reply-To: <544F5BA4.3090703@thierry-pelle.eu> 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: abonnements Cc: Org Mode Hi Thierry On Tue, Oct 28, 2014 at 10:02 AM, abonnements wrote: > #+call: gen(A) > #+results: A > : 10 > > #+call: gen(B) > #+results: B > : 20 > > Is there a simple mean to aggregate the results in a table, i.e to get > | A | 10 | > | B | 20 | One solution with TBLFM is: #+BEGIN_SRC emacs-lisp '(10) #+END_SRC #+NAME: A #+RESULTS: | 10 | #+BEGIN_SRC emacs-lisp '(20) #+END_SRC #+NAME: B #+RESULTS: | 20 | Aggregate multiple tables: | Table | Value | |-------+-------| | A | 10 | | B | 20 | #+TBLFM: @<<$2..@>$2 = remote($1, @1$1) Requires Emacs 24.4 or an Org version from at least 2014. For reference see also the unit test in the Org source testing/lisp/test-org-table.el test-org-table/remote-reference-indirect Michael