From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rick Frankel Subject: [BUG] hline references on left side of table formula Date: Wed, 01 May 2013 13:27:03 -0400 Message-ID: <760e1f326345602d5fdfc3e9197444d2@mail.rickster.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:33051) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UXao5-00063U-L1 for emacs-orgmode@gnu.org; Wed, 01 May 2013 13:27:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UXao3-0008D2-7b for emacs-orgmode@gnu.org; Wed, 01 May 2013 13:27:05 -0400 Received: from [204.62.15.78] (port=56864 helo=mail.rickster.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UXao3-0008Cw-3p for emacs-orgmode@gnu.org; Wed, 01 May 2013 13:27:03 -0400 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: Org-Mode Hi- 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. Here are some examples to show the results. I would expect all three versions to generate the same results as the first example. #+BEGIN_ORG * Absolute reference (expected results) | a | b | |---+---| | x | 1 | | y | 2 | |---+---| | | 3 | #+TBLFM: @4$2=vsum(@I..@II) * hline reference | a | b | |-------+---| | x | 1 | | y | 2 | |-------+---| | x + y | 3 | #+TBLFM: @II$2=vsum(@I..@II) * hline reference with full cell specification in sum | a | b | |---+---| | x | 1 | | y | 2 | |---+---| | 3 | 3 | #+TBLFM: @II$2=vsum(@I$2..@II$2) #+END_ORG 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' rick