emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Charles Millar <millarc@verizon.net>
To: emacs-orgmode@gnu.org
Subject: Featur request org-table-iterate-table-subtree
Date: Sat, 24 Oct 2015 21:18:57 -0400	[thread overview]
Message-ID: <562C2E01.5070105@verizon.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 672 bytes --]

Please see the attached example. If I call 
org-table-iterate-buffer-tables, Summary1 and Summary2 both are 
calculated using the referenced tables in heading "first set of tables" 
and the tables in the second heading are disregarded.

Without going into the details there are times when I use certain form 
tables in separate headlines in the same file. The entries are different 
in each and I believe that a function perhaps 
"org-table-iterate-subtree-tables" would be a useful addition to 
org-table.el.

Please note that narrowing the buffer to the second headline does not 
help since the code in org-table-iterate-buffer-tables widens the buffer.

Charlie Millar

[-- Attachment #2: OrgTableExample.org --]
[-- Type: text/plain, Size: 2185 bytes --]

* first set of tables

#+TBLNAME: SUMMARY1
| CHARGES        |      |       |
| Schedule "A"   | 6.00 |       |
| Schedule "A-1" | 6.00 |       |
| Schedule "A-2" | 6.00 |       |
| total          |      | 18.00 |
#+TBLFM: @>$>=vsum(@2$2..@4$2);%.2f::@2$2=remote(SCHEDA,@>$>);%.2f::@3$2=remote(SCHEDA1,@>$>);%.2f::@4$2=remote(SCHEDA2,@>$>);%.2f

#+TBLNAME: SCHEDA
| Description      | Basis |
|------------------+-------|
| Something A      |  1.00 |
| Something else A |  2.00 |
| Another thing A  |  3.00 |
| Total            |  6.00 |
#+TBLFM: @>$>=vsum(@I$>..@>>$>);%.2f

#+NAME: SCHEDA1
#+TBLNAME: SCHEDA
| Description        | Basis |
|--------------------+-------|
| Something A-1      |  1,00 |
| Something else A-1 |  2.00 |
| Another thing A-1  |  3.00 |
| Total              |  6.00 |
#+TBLFM: @>$>=vsum(@I$>..@>>$>);%.2f

#+NAME: SCHEDA2
#+TBLNAME: SCHEDA
| Description        | Basis |
|--------------------+-------|
| Something A-2      |  1.00 |
| Something else A-2 |  2.00 |
| Another thing A-2  |  3.00 |
| Total              |  6.00 |
#+TBLFM: @>$>=vsum(@I$>..@>>$>);%.2f


* second set of tables

#+TBLNAME: SUMMARY2
| CHARGES        |      |       |
| Schedule "A"   | 6.00 |       |
| Schedule "A-1" | 6.00 |       |
| Schedule "A-2" | 6.00 |       |
| total          |      | 18.00 |
#+TBLFM: @>$>=vsum(@2$2..@4$2);%.2f::@2$2=remote(SCHEDA,@>$>);%.2f::@3$2=remote(SCHEDA1,@>$>);%.2f::@4$2=remote(SCHEDA2,@>$>);%.2f

#+TBLNAME: SCHEDA
| Description      | Basis |
|------------------+-------|
| Something A      |  3.00 |
| Something else A |  2.00 |
| Another thing A  |  3.00 |
| Total            |  8.00 |
#+TBLFM: @>$>=vsum(@I$>..@>>$>);%.2f

#+NAME: SCHEDA1
#+TBLNAME: SCHEDA
| Description        | Basis |
|--------------------+-------|
| Something A-1      |  3.00 |
| Something else A-1 |  2.00 |
| Another thing A-1  |  3.00 |
| Total              |  8.00 |
#+TBLFM: @>$>=vsum(@I$>..@>>$>);%.2f

#+NAME: SCHEDA2
#+TBLNAME: SCHEDA
| Description        | Basis |
|--------------------+-------|
| Something A-2      |  3.00 |
| Something else A-2 |  2.00 |
| Another thing A-2  |  3.00 |
| Total              |  8.00 |
#+TBLFM: @>$>=vsum(@I$>..@>>$>);%.2f



             reply	other threads:[~2015-10-25  1:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-25  1:18 Charles Millar [this message]
2015-11-27 21:27 ` Featur request org-table-iterate-table-subtree Charles Millar
2015-12-03 19:17   ` Aaron Ecay
2015-12-07 22:58     ` Charles Millar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=562C2E01.5070105@verizon.net \
    --to=millarc@verizon.net \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).