From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Table cell refs with @0 or $0 are broken Date: Wed, 04 Apr 2012 18:36:31 -0400 Message-ID: <11420.1333578991@alphaville> References: <874nszzvoe.wl%jamshark70@dewdrop-world.net> <5119.1333559874@alphaville> <4F7CADF9.8070609@christianmoe.com> <8925.1333573540@alphaville> <4F7CB96C.6040109@christianmoe.com> Reply-To: nicholas.dokos@hp.com Return-path: Received: from eggs.gnu.org ([208.118.235.92]:40466) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SFYoy-00041f-IJ for emacs-orgmode@gnu.org; Wed, 04 Apr 2012 18:37:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SFYot-0001j0-Ng for emacs-orgmode@gnu.org; Wed, 04 Apr 2012 18:36:56 -0400 Received: from g4t0017.houston.hp.com ([15.201.24.20]:10650) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SFYot-0001fo-Iv for emacs-orgmode@gnu.org; Wed, 04 Apr 2012 18:36:51 -0400 In-Reply-To: Message from Christian Moe of "Wed, 04 Apr 2012 23:13:16 +0200." <4F7CB96C.6040109@christianmoe.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: mail@christianmoe.com Cc: jamshark70@gmail.com, Org Mode Christian Moe wrote: > On 4/4/12 11:05 PM, Nick Dokos wrote: > (...) > >> #+TBLFM: @2$2..@>$>=@0;%.3f > >> > >> Try substituting `$0' for `@0', it works the same. @0 designates the > >> current row, and the current column is taken as implied. Ditto when $0 > >> designates the current column. However, `@0$0' will not work. > >> > > > > Ah, OK - I'm blind: on rereading it, and retrying it, I see that it just > > pushes everything down to 0.000 - but that looks like a different bug to > > me, no? > > > > Nick > > That's what I'm getting, and you're right, it does look different. > Ah, you shouldn't listen to me: even though it looks different, a patch that I was trying out to fix James's problem seems to fix this problem too - so they must be the same after all. I just added a couple of sanity checks to org-table-get-range so that c1 and c2 are set to a sane value not only when they are nil but also when they are 0 (around line 2666 or so in org-table.el): ... (if (not c1) (setq c1 col)) (if (not c2) (setq c2 col)) (if (= c1 0) (setq c1 col)) (if (= c2 0) (setq c2 col)) ... Nick