[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] sum up variables from different org-mode tables
From: |
Michael Brand |
Subject: |
Re: [O] sum up variables from different org-mode tables |
Date: |
Sat, 4 Jan 2014 16:29:36 +0100 |
Hi all
On Fri, Nov 16, 2012 at 4:16 PM, Michael Brand
<address@hidden> wrote:
> [...]
> A nice solution for variant 2 would be if
> @address@hidden = remote(A, @>>$$#) :: @address@hidden = remote(B, @>>$$#)
> could be simplified to
> @address@hidden = remote($8, @>>$$#)
> [...]
Because I need the above indirection of remote references I
implemented it a few days ago, see the attached patches. Comments are
welcome, otherwise I will push the changes to the Org repo in a few
days.
This is the use case that is checked in the Emacs Regression Test
test-org-table/remote-reference-indirect in
testing/lisp/test-org-table.el:
#+NAME: 2012
| amount |
|--------|
| 1 |
| 2 |
|--------|
| 3 |
#+TBLFM: @>$1 = vsum(@address@hidden)
#+NAME: 2013
| amount |
|--------|
| 4 |
| 8 |
|--------|
| 12 |
#+TBLFM: @>$1 = vsum(@address@hidden)
#+NAME: summary
| year | amount |
|-------+--------|
| 2012 | 3 |
| 2013 | 12 |
|-------+--------|
| total | 15 |
#+TBLFM: @<<$2..@>>$2 = remote($<, @>$1) :: @>$2 = vsum(@address@hidden)
Michael
0001-TBLFM-remote-ref-Add-ERT-for-summary-table.patch.txt
Description: Text document
0002-TBLFM-remote-ref-Add-indirection-of-name-or-ID.patch.txt
Description: Text document
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [O] sum up variables from different org-mode tables,
Michael Brand <=