From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Table rows and ranges as LHS of formulas Date: Thu, 03 Mar 2011 17:11:00 -0500 Message-ID: <5233.1299190260@alphaville.usa.hp.com> References: <5A22097F-A1F9-480E-B2E5-030CD6493B2F@gmail.com> <878vwx5tgl.fsf@gnu.org> <907667C9-5D38-4DF4-B0CE-BEFEFE40A192@gmail.com> <24402.1299092049@alphaville.dokosmarshall.org> <31535.1299125895@alphaville.dokosmarshall.org> <20110303140151.3737c6a4@bhishma.homelinux.net> Reply-To: nicholas.dokos@hp.com Return-path: Received: from [140.186.70.92] (port=46355 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PvGkp-00039E-0g for emacs-orgmode@gnu.org; Thu, 03 Mar 2011 17:12:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PvGkl-0002j9-9J for emacs-orgmode@gnu.org; Thu, 03 Mar 2011 17:12:13 -0500 Received: from g5t0008.atlanta.hp.com ([15.192.0.45]:19879) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PvGkl-0002ip-5d for emacs-orgmode@gnu.org; Thu, 03 Mar 2011 17:12:11 -0500 In-Reply-To: Message from Suvayu Ali of "Thu, 03 Mar 2011 14:01:51 PST." <20110303140151.3737c6a4@bhishma.homelinux.net> 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: Suvayu Ali Cc: nicholas.dokos@hp.com, emacs-orgmode List , Carsten Dominik Suvayu Ali wrote: > Hi, > > On Thu, 3 Mar 2011 22:19:32 +0100 > Carsten Dominik wrote: > > > > > On 3.3.2011, at 05:18, Nick Dokos wrote: > > > > > Carsten Dominik wrote: > > > > > >> Maybe we should use something else to achieve symmetry, like @> > > >> and $>. > > >> > > >> Comments? > > >> > > > > > > Perfect. Mirrors the keybinding for end-of-buffer, so there is > > > mnemonic value there, and it naturally flows from the @N$N notation. > > > > OK, this is how it works now. @L no longer works. > > > > I updated org just now. But when I try this, > > | Expense | Amount (CAD) | > |----------+--------------| > | Tickets | 1191.82 | > | hostel | 838.49 | > | per diem | 1050.00 | > |----------+--------------| > | Total | | > #+TBLFM: @>$>=vsum(@I..@II);%.2f > > It doesn't work. Whereas this does: > > | Expense | Amount (CAD) | > |----------+--------------| > | Tickets | 1191.82 | > | hostel | 838.49 | > | per diem | 1050.00 | > |----------+--------------| > | Total | 3080.31 | > #+TBLFM: @5$2=vsum(@I..@II);%.2f > > Am I doing something wrong? > I don't think so: I don't see Carsten's change even though I just pulled, so I guess he has not pushed it yet (or forgot to): ,---- | $ git log -3 lisp/org-table.el | commit dc60852d24b16555466214712181351e11b68e7c | Author: Bastien Guerry | Date: Thu Mar 3 09:34:34 2011 +0100 | | Fix small typo in docstring. | | commit 8892fe3f0404dd608452dd8203f2783a212e8120 | Author: Bastien Guerry | Date: Thu Mar 3 09:30:16 2011 +0100 | | Fix small typo in docstring. | | commit 8237c9ae6d587a22646333e0315683675e2db538 | Author: Carsten Dominik | Date: Tue Mar 1 09:05:56 2011 +0100 | | Implement table formulas that apply to field ranges, fix minor issues | | * lisp/org-table.el (org-table-fedit-finish): Read more general LHS of formulas. | (org-table-formula-handle-@L): New function to hanle @L references. | (org-table-current-ncol): New variable. | (org-table-line-to-dline): New function. | (org-table-get-stored-formulas): Accept range formulas as matches. | (org-table-get-specials): Compute and store the number of columns. | (org-table-get-range): New optional argument CORNERS-ONLY, to retrieve | only the region marked by the range, not the content. | (org-table-recalculate): Call `org-table-expand-lhs-ranges' to expand | range targets. Also check for duplicate access to fields. | (org-table-expand-lhs-ranges): New funktion. | (org-table-get-remote-range): Bind `org-table-current-ncol' to protect | the caller's value. | (org-table-edit-formulas): Support highlighting of range targets. | (org-table-field-info): Handle renge formulas. | | * doc/org.texi (Field and range formulas): Renamed from "Field formulas". | Document the use of range operators as targets. | (References): Document the new @L reference. `---- Nick