From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sankalp Subject: Re: Using last row in remote table references Date: Fri, 13 Jan 2012 09:00:03 +0530 Message-ID: References: <2D76BBD878DB8B49BBE309F15526B38E8042@SJEXCHMB06.corp.ad.broadcom.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=20cf307f33a03d760d04b6607c5e Return-path: Received: from eggs.gnu.org ([140.186.70.92]:58846) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RlXqU-000678-Ti for emacs-orgmode@gnu.org; Thu, 12 Jan 2012 22:30:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RlXqT-0000Pu-4T for emacs-orgmode@gnu.org; Thu, 12 Jan 2012 22:30:26 -0500 Received: from mail-vw0-f41.google.com ([209.85.212.41]:38958) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RlXqS-0000Pq-W5 for emacs-orgmode@gnu.org; Thu, 12 Jan 2012 22:30:25 -0500 Received: by vbnl22 with SMTP id l22so1049275vbn.0 for ; Thu, 12 Jan 2012 19:30:24 -0800 (PST) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Michael Brand Cc: "Phil (Philip) Mason" , "emacs-orgmode@gnu.org" --20cf307f33a03d760d04b6607c5e Content-Type: text/plain; charset=ISO-8859-1 On 11 January 2012 23:04, Michael Brand wrote: > Hi Phil > > On Tue, Jan 10, 2012 at 14:39, Phil (Philip) Mason > 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 --20cf307f33a03d760d04b6607c5e Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
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&= gt; 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

=A0
I'm using org 7.8.03 but the issue is still th= ere.
=A0
> 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/20= 11-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-coordi= nates-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 | =A0 =A0 |
| e | =A0 =A0 |
|---+-----|
#+TBLFM: @<$2..@>>>$2 =3D '(concat @0$1..@+2$1)

With a remote table you can not use the simple solution.

Michael


As mentioned in my emails a whi= le ago, @> still evaluates to the number of rows in the current table (f= rom where the reference is being made) instead of the number of rows in the= remote table being referenced.

http://imgur.com/4W75H

=
Sincerely,
--
Sankalp
--20cf307f33a03d760d04b6607c5e--