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 17:05:40 -0400 Message-ID: <8925.1333573540@alphaville> References: <874nszzvoe.wl%jamshark70@dewdrop-world.net> <5119.1333559874@alphaville> <4F7CADF9.8070609@christianmoe.com> Reply-To: nicholas.dokos@hp.com Return-path: Received: from eggs.gnu.org ([208.118.235.92]:51429) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SFXOj-0000Mf-Og for emacs-orgmode@gnu.org; Wed, 04 Apr 2012 17:05:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SFXOg-0003VL-VE for emacs-orgmode@gnu.org; Wed, 04 Apr 2012 17:05:45 -0400 Received: from g1t0026.austin.hp.com ([15.216.28.33]:47600) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SFXOg-0003V6-PD for emacs-orgmode@gnu.org; Wed, 04 Apr 2012 17:05:42 -0400 In-Reply-To: Message from Christian Moe of "Wed, 04 Apr 2012 22:24:25 +0200." <4F7CADF9.8070609@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 7:17 PM, Nick Dokos wrote: > > James Harkins wrote: > > > >> Don't know if this is fixed in a later org update, but -- the online > >> org manual says that you can refer to table cells in the current row > >> or column using @0 and $0 respectively, but that's definitely not > >> working on my machine. > (...) > >> ** Broken: "Not in table data field" > >> | 1.0 | > >> | 2.0 | > >> | | > >> #+TBLFM: @>$1=vsum(@1$0..@2$0) > (...) > > Did this ever work? I've spot-checked back to 6.36c and I cannot find > > a release where it actually worked: assuming I haven't made a mistake, > > it seems to be an implementation oversight, rather than some patch > > specifically breaking the functionality. > > > > Nick > > > > I find that zero references do work, albeit not quite as one might be > led to believe by the manual. > > Agreed, it does not work in James' example. And agreed, the manual > seems to me to suggest, to the contrary, that `@1$0' should work. > Though it does also make clear that the `$0' is superfluous and can be > omitted, because when only the row is given, the current column is > taken as implied. So we all agree `@1' works. > > But consider the following example, which also works. Here is some > output from fitting a linear trend in Org-Babel/R. (I've shaved off > some decimals to fit this in an email.) Computing the TBLFM will round > the number in each cell to three decimal places. > > #+results: > | Record | Slope | ConfLower | ConfUpper | > |----------+--------------+--------------+--------------| > | GISTEMP | 0.0173837600 | 0.0133209130 | 0.0214466060 | > | HadCrut3 | 0.0158602890 | 0.0118664610 | 0.0198541180 | > #+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 > It would seem that either one of $0 and @0 on its own in practice > designates "the current cell". > > Also, I can't think of a situation where either would be needed to > designate a whole column or row respectively. > > > Yours, > Christian > > >