From mboxrd@z Thu Jan 1 00:00:00 1970 From: theo Subject: Re: making flexible table formulas Date: Tue, 01 Mar 2011 05:41:12 +0100 Message-ID: <4D6C78E8.4070806@theocrite.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=47003 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PuHOs-0002Ax-QY for emacs-orgmode@gnu.org; Mon, 28 Feb 2011 23:41:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PuHOr-0008Im-KB for emacs-orgmode@gnu.org; Mon, 28 Feb 2011 23:41:30 -0500 Received: from smtp-151-monday.nerim.net ([194.79.134.151]:45454 helo=maiev.nerim.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PuHOr-0008IL-ES for emacs-orgmode@gnu.org; Mon, 28 Feb 2011 23:41:29 -0500 Received: from mails.orness.com (orness-37-189.cnt.nerim.net [213.215.37.189]) by maiev.nerim.net (Postfix) with ESMTP id 0D5B82E009 for ; Tue, 1 Mar 2011 05:41:28 +0100 (CET) Received: from [192.168.0.1] (mal.theocrite.org [82.225.149.66]) by mails.orness.com (mail) with ESMTP id B07BB5CC04D for ; Tue, 1 Mar 2011 06:21:02 +0100 (CET) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 01/03/2011 04:19, Rustom Mody wrote: > Nick Dokos wrote: > >> Of course it's reasonable - and of course, org implements it >> #+TBLFM: $LR2=vsum(@1..@-1) > > Thanks Nick I can use that. But I dont understand it. What's the -1? > The manual says -- relative to 'current' column. > What determines 'current?' There must be some obvious POV which I am missing... @X = row X, absolute. @-X = X rows before, relative. For instance : I*1 |A--| 1| 1 | 2| 2 | 3| 3 | I*2 |A--| 4| 6 | I*3 |A--| #+TBLFM: $1=vsum(@1..@-1) Here the 4th row is the sum. So @-1refers to the 3rd row. If we add a new row before, the sum still works. I*1 |A---| 1| 1 | 2| 2 | 3| 3 | 4| 42 | I*2 |A---| 5| 48 | I*3 |A---| #+TBLFM: $1=vsum(@1..@-1) @-1 now refers to the 4 row. - -- freely yours, theo -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJNbHjoAAoJECkgngj8k9TvPggIAKXvaaz4HfzPOiU2RAajBqYq /qFYvk5Pf3e1QJme8qiiY0JWiW6isS+YI7bg9Hg6XLe5F3qxm20zz3Z008jWyZuN TBhsr6ox0B3Hf3OnienQrhUvm8v1bIWiEhJFd/qBG0mp8dY5zeuJro6bLWrZxKhn zVO0dw7rh3xQoYIOzRIoP1wnykg2xw3st4GH4JqdSusLhAwy/AfkvjgXBf3qbZ/p FU8ksalYgQUb9S+GGpFdzIyPqJ+d7m3JbAQHbZ0Wpak0oCR306BGIcBuqMqzAZCd 5ukuHJr+Ug4Mlt+OjreAJajeMUVAYTSCU46nupuEJysK4egKEz0LLcNPzoXr7BU= =o6Qk -----END PGP SIGNATURE----- -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.