* Featur request org-table-iterate-table-subtree
@ 2015-10-25 1:18 Charles Millar
2015-11-27 21:27 ` Charles Millar
0 siblings, 1 reply; 4+ messages in thread
From: Charles Millar @ 2015-10-25 1:18 UTC (permalink / raw)
To: emacs-orgmode
[-- 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Featur request org-table-iterate-table-subtree
2015-10-25 1:18 Featur request org-table-iterate-table-subtree Charles Millar
@ 2015-11-27 21:27 ` Charles Millar
2015-12-03 19:17 ` Aaron Ecay
0 siblings, 1 reply; 4+ messages in thread
From: Charles Millar @ 2015-11-27 21:27 UTC (permalink / raw)
To: emacs-orgmode
Any thoughts? Any body?
If there are two headlines each with the same set of table templates but
different data in each, org-table-iterate-buffer-tables will converge;
however the convergence may yield incorrect results.
I suppose there are two options at the moment,
rename all tables in heading 1 to heading1summary, heading1A,
heading1B, etc. and heading2summary, heading2A, heading2B, etc. and
change all remote references to reflect this, or
set up separate org files for each set of tables although the
tables pertain to the same over all subject.
Neither is really acceptable, but the second is the least trouble.
A third choice is worse, narrow to the heading and use org-table-iterate
on each table. At least the buffer should not be widened in that case.
I have missed some documentation? I thought this would be a useful
feature much the same way that export-subtree.
Charlie Millar
On 10/24/2015 09:18 PM, Charles Millar wrote:
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Featur request org-table-iterate-table-subtree
2015-11-27 21:27 ` Charles Millar
@ 2015-12-03 19:17 ` Aaron Ecay
2015-12-07 22:58 ` Charles Millar
0 siblings, 1 reply; 4+ messages in thread
From: Aaron Ecay @ 2015-12-03 19:17 UTC (permalink / raw)
To: Charles Millar, emacs-orgmode
Hi Charlie,
2015ko azaroak 27an, Charles Millar-ek idatzi zuen:
>
> Any thoughts? Any body?
Well, FWIW...
#+tblname’s should be unique within a document. Your problems stem from
that, and your proposed solutions all work around it in some way. I
can’t think of any better way to address your desired usage than the
ones you listed (and would caution you that using narrowing to defeat
the uniqueness assumption, while perhaps adequate for the short term, is
fragile and could break at any time).
--
Aaron Ecay
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Featur request org-table-iterate-table-subtree
2015-12-03 19:17 ` Aaron Ecay
@ 2015-12-07 22:58 ` Charles Millar
0 siblings, 0 replies; 4+ messages in thread
From: Charles Millar @ 2015-12-07 22:58 UTC (permalink / raw)
To: emacs-orgmode
Hi Aaron,
On 12/03/2015 02:17 PM, Aaron Ecay wrote:
> Hi Charlie,
>
> 2015ko azaroak 27an, Charles Millar-ek idatzi zuen:
>> Any thoughts? Any body?
> Well, FWIW...
>
> #+tblname’s should be unique within a document. Your problems stem from
> that, and your proposed solutions all work around it in some way. I
> can’t think of any better way to address your desired usage than the
> ones you listed (and would caution you that using narrowing to defeat
> the uniqueness assumption, while perhaps adequate for the short term, is
> fragile and could break at any time).
>
Thanks for the input.
Charlie
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-12-07 22:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-25 1:18 Featur request org-table-iterate-table-subtree Charles Millar
2015-11-27 21:27 ` Charles Millar
2015-12-03 19:17 ` Aaron Ecay
2015-12-07 22:58 ` Charles Millar
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.