* Using last row in remote table references
@ 2012-01-10 13:39 Phil (Philip) Mason
2012-01-11 17:34 ` Michael Brand
0 siblings, 1 reply; 5+ messages in thread
From: Phil (Philip) Mason @ 2012-01-10 13:39 UTC (permalink / raw)
To: emacs-orgmode@gnu.org
Hello all,
Should I be able to use @> in references to remote tables?
For example in the tables below I would expect the results table to show "cde" as the result of both formulas.
#+TBLNAME: TEST1
|---+---|
| a | f |
| b | g |
| c | h |
| d | i |
| e | j |
|---+---|
#+TBLNAME: RESULTS
|--------------|
| Formula test |
|--------------|
| cde |
| abc |
|--------------|
#+TBLFM: @2$1='(concat remote(TEST1, @3$1..@5$1))::@3$1='(concat remote(TEST1, @3$1..@>$1))
Is there a syntax I should be using if I want to get all the entries in a table below a certain row without explicitly entering the number of the last row?
Thanks in advance
Phil Mason
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Using last row in remote table references
2012-01-10 13:39 Using last row in remote table references Phil (Philip) Mason
@ 2012-01-11 17:34 ` Michael Brand
2012-01-13 3:30 ` Sankalp
0 siblings, 1 reply; 5+ messages in thread
From: Michael Brand @ 2012-01-11 17:34 UTC (permalink / raw)
To: Phil (Philip) Mason; +Cc: emacs-orgmode@gnu.org
Hi Phil
On Tue, Jan 10, 2012 at 14:39, Phil (Philip) Mason
<phil.mason@broadcom.com> wrote:
> Should I be able to use @> in references to remote tables?
Yes, this issue has been resolved by Carsten with
release_7.7-420-g1432e4b
> Is there a syntax I should be using if I want to get all the entries
> in a table below a certain row without explicitly entering the
> number of the last row?
The general solution for a Calc formula is e. g. with subvec as I
described here:
http://lists.gnu.org/archive/html/emacs-orgmode/2011-11/msg00562.html
and in a similar sense as I described for subscr in the subsection
"Dynamic variation of ranges" here:
http://orgmode.org/worg/org-hacks.html#field-coordinates-in-formulas
The general solution for a Lisp formula is e. g. with calc-subvector I
guess.
The following simpler solution is only possible when the range is
relative to the field where the formula is evaluated in and when the
offset to the range border is static:
|---+-----|
| a | abc |
| b | bcd |
| c | cde |
| d | |
| e | |
|---+-----|
#+TBLFM: @<$2..@>>>$2 = '(concat @0$1..@+2$1)
With a remote table you can not use the simple solution.
Michael
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Using last row in remote table references
2012-01-11 17:34 ` Michael Brand
@ 2012-01-13 3:30 ` Sankalp
2012-01-13 3:51 ` Michael Brand
0 siblings, 1 reply; 5+ messages in thread
From: Sankalp @ 2012-01-13 3:30 UTC (permalink / raw)
To: Michael Brand; +Cc: Phil (Philip) Mason, emacs-orgmode@gnu.org
[-- Attachment #1: Type: text/plain, Size: 1632 bytes --]
On 11 January 2012 23:04, Michael Brand <michael.ch.brand@gmail.com> wrote:
> Hi Phil
>
> On Tue, Jan 10, 2012 at 14:39, Phil (Philip) Mason
> <phil.mason@broadcom.com> wrote:
> > Should I be able to use @> in references to remote tables?
>
> Yes, this issue has been resolved by Carsten with
> release_7.7-420-g1432e4b
>
>
I'm using org 7.8.03 but the issue is still there.
> > Is there a syntax I should be using if I want to get all the entries
> > in a table below a certain row without explicitly entering the
> > number of the last row?
>
> The general solution for a Calc formula is e. g. with subvec as I
> described here:
> http://lists.gnu.org/archive/html/emacs-orgmode/2011-11/msg00562.html
> and in a similar sense as I described for subscr in the subsection
> "Dynamic variation of ranges" here:
> http://orgmode.org/worg/org-hacks.html#field-coordinates-in-formulas
>
> The general solution for a Lisp formula is e. g. with calc-subvector I
> guess.
>
> The following simpler solution is only possible when the range is
> relative to the field where the formula is evaluated in and when the
> offset to the range border is static:
>
> |---+-----|
> | a | abc |
> | b | bcd |
> | c | cde |
> | d | |
> | e | |
> |---+-----|
> #+TBLFM: @<$2..@>>>$2 = '(concat @0$1..@+2$1)
>
> With a remote table you can not use the simple solution.
>
> Michael
>
>
As mentioned in my emails a while ago, @> still evaluates to the number of
rows in the current table (from where the reference is being made) instead
of the number of rows in the remote table being referenced.
http://imgur.com/4W75H
Sincerely,
--
Sankalp
[-- Attachment #2: Type: text/html, Size: 2940 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Using last row in remote table references
2012-01-13 3:30 ` Sankalp
@ 2012-01-13 3:51 ` Michael Brand
2012-01-13 4:15 ` Sankalp
0 siblings, 1 reply; 5+ messages in thread
From: Michael Brand @ 2012-01-13 3:51 UTC (permalink / raw)
To: Sankalp; +Cc: Org Mode
Hi Sankalp
On Fri, Jan 13, 2012 at 04:30, Sankalp <sankalpkhare@gmail.com> wrote:
> I'm using org 7.8.03 but the issue is still there.
I can not reproduce with release_7.8.02-13-g0c09a.dirty:
|--------|
| Amount |
|--------|
| 130 |
|--------|
| |
|--------|
#+TBLFM: @2$1=remote(xyz,@>$1)
#+TBLNAME: xyz
|--------|
| -200 |
| 120 |
| -75 |
| -5 |
| 130 |
|--------|
Maybe check your Org mode installation upgrade, make etc. Search for
"M-x locate-library RET org" for more information.
Michael
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Using last row in remote table references
2012-01-13 3:51 ` Michael Brand
@ 2012-01-13 4:15 ` Sankalp
0 siblings, 0 replies; 5+ messages in thread
From: Sankalp @ 2012-01-13 4:15 UTC (permalink / raw)
To: Michael Brand; +Cc: Org Mode
[-- Attachment #1: Type: text/plain, Size: 796 bytes --]
Hi Michael,
On 13 January 2012 09:21, Michael Brand <michael.ch.brand@gmail.com> wrote:
> Hi Sankalp
>
> On Fri, Jan 13, 2012 at 04:30, Sankalp <sankalpkhare@gmail.com> wrote:
> > I'm using org 7.8.03 but the issue is still there.
>
> I can not reproduce with release_7.8.02-13-g0c09a.dirty:
>
> |--------|
> | Amount |
> |--------|
> | 130 |
> |--------|
> | |
> |--------|
> #+TBLFM: @2$1=remote(xyz,@>$1)
>
> #+TBLNAME: xyz
> |--------|
> | -200 |
> | 120 |
> | -75 |
> | -5 |
> | 130 |
> |--------|
>
> Maybe check your Org mode installation upgrade, make etc. Search for
> "M-x locate-library RET org" for more information.
>
>
Turns out it was indeed the issue.
I was working on one of the machines where I still had an older version of
org.
Thanks,
---
Sankalp
[-- Attachment #2: Type: text/html, Size: 1447 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-01-13 4:16 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-10 13:39 Using last row in remote table references Phil (Philip) Mason
2012-01-11 17:34 ` Michael Brand
2012-01-13 3:30 ` Sankalp
2012-01-13 3:51 ` Michael Brand
2012-01-13 4:15 ` Sankalp
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.