From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Spreadsheet question Date: Fri, 5 Dec 2008 13:23:07 +0100 Message-ID: References: <87abbdc58q.fsf@thinkpad.tsdh.de> <6BD7F784-D3F6-4953-9156-11A9F3136B72@uva.nl> <877i6gcizy.fsf@thinkpad.tsdh.de> <4B5CC0DE-9FFB-4D8E-BC03-2D1F6D9359BA@uva.nl> Mime-Version: 1.0 (Apple Message framework v929.2) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L8ZiG-0005bI-38 for emacs-orgmode@gnu.org; Fri, 05 Dec 2008 07:23:16 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L8ZiD-0005ZM-9i for emacs-orgmode@gnu.org; Fri, 05 Dec 2008 07:23:15 -0500 Received: from [199.232.76.173] (port=33130 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L8ZiB-0005Ya-Ls for emacs-orgmode@gnu.org; Fri, 05 Dec 2008 07:23:12 -0500 Received: from ug-out-1314.google.com ([66.249.92.170]:25560) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L8ZiB-0006HP-4q for emacs-orgmode@gnu.org; Fri, 05 Dec 2008 07:23:11 -0500 Received: by ug-out-1314.google.com with SMTP id 36so4589984uga.17 for ; Fri, 05 Dec 2008 04:23:09 -0800 (PST) In-Reply-To: <4B5CC0DE-9FFB-4D8E-BC03-2D1F6D9359BA@uva.nl> 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: Carsten Dominik Cc: Tassilo Horn , emacs-orgmode@gnu.org Actually, thinking more about this, I think that Tassilo is right. Therefore, from now on, this condition will throw an error. I would like to make this #ERROR in the table cell, but this is not easy, so for the time being, it really stops the evaluation with an error message. Thanks, Tassilo, for pointing to this issue. - Carsten On Dec 5, 2008, at 8:26 AM, Carsten Dominik wrote: > Hi Tassilo, > > I can see that this could be confusing, and maybe it should throw an > error. > > The use-ase fo this are running means as column formulas > that would be undefined for he first few rows in. Consider > the following table: > > > | i | nn | mean of last 3 | > |---+----+----------------| > | 1 | 4 | 4.00 | > | 2 | 7 | 5.50 | > | 3 | 2 | 4.33 | > | 4 | 4 | 4.33 | > | 5 | 5 | 3.67 | > | 6 | 7 | 5.33 | > | 7 | 9 | 7.00 | > | 8 | 22 | 12.67 | > #+TBLFM: $3=vmean([@-2$-1..$-1]);%.2f > > I am not sure how common this use is and who would > be hurt by turning this behavior into an error. > > - Carsten > > On Dec 4, 2008, at 11:49 AM, Tassilo Horn wrote: > >> Carsten Dominik writes: >> >> Hi Carsten, >> >>> @-1 references the row above the current. If that is a hline, if >>> actually references the current line. >> >> Yes, I see that, but I wonder if that's actually the right thing to >> do. >> IMO defaulting to some cell/row/column which is not referenced >> correctly >> might obscure wrong formulas. >> >> For example, in my case the first calculation gave 2 which is correct >> and only the second recalculation shows me that the forumla is wrong. >> So I'd prefer an #ERROR if a reference doesn't exist. >> >> Bye, >> Tassilo >