From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: [BUG] hline references on left side of table formula Date: Mon, 2 Sep 2013 10:10:14 +0200 Message-ID: References: <760e1f326345602d5fdfc3e9197444d2@mail.rickster.com> Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36724) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGPDK-0003sS-JO for emacs-orgmode@gnu.org; Mon, 02 Sep 2013 04:10:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VGPDE-0000Uf-PR for emacs-orgmode@gnu.org; Mon, 02 Sep 2013 04:10:22 -0400 Received: from mail-wi0-x232.google.com ([2a00:1450:400c:c05::232]:53179) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGPDE-0000UX-It for emacs-orgmode@gnu.org; Mon, 02 Sep 2013 04:10:16 -0400 Received: by mail-wi0-f178.google.com with SMTP id hn9so321248wib.11 for ; Mon, 02 Sep 2013 01:10:15 -0700 (PDT) In-Reply-To: <760e1f326345602d5fdfc3e9197444d2@mail.rickster.com> 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: Rick Frankel Cc: Org-Mode Hi Rick, hline-relative references on the left side of a table are currently not = supported. The fact that this is expanded is a bug. A patch catching = this case would be very welcome. Regards - Carsten On May 1, 2013, at 7:27 PM, Rick Frankel wrote: > Hi- >=20 > I don't know if this is a bug or feature :), but if an hline reference > (@I, etc) is used on the left side of a calculation, it applies to ALL > columns in the row even if the column is specfied. >=20 > Here are some examples to show the results. I would expect all three > versions to generate the same results as the first example. >=20 > #+BEGIN_ORG > * Absolute reference (expected results) > | a | b | > |---+---| > | x | 1 | > | y | 2 | > |---+---| > | | 3 | > #+TBLFM: @4$2=3Dvsum(@I..@II) >=20 > * hline reference > | a | b | > |-------+---| > | x | 1 | > | y | 2 | > |-------+---| > | x + y | 3 | > #+TBLFM: @II$2=3Dvsum(@I..@II) >=20 > * hline reference with full cell specification in sum > | a | b | > |---+---| > | x | 1 | > | y | 2 | > |---+---| > | 3 | 3 | > #+TBLFM: @II$2=3Dvsum(@I$2..@II$2) > #+END_ORG >=20 > FWIW, I believe the problem is that `org-table-recalculate' is > matching lhs cell references explicitly against pure numeric > references ("@[0-9]+$[0-9]+") and therefore expands the lhs via > `org-expand-lhs-ranges' instead of expanding it with > `org-table-get-descriptor-line' >=20 > rick >=20 >=20