Hi Thierry

On Tue, Oct 28, 2014 at 10:02 AM, abonnements
<abonneme...@thierry-pelle.eu> 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

Reply via email to