From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Spreadsheet question Date: Fri, 5 Dec 2008 08:26:46 +0100 Message-ID: <4B5CC0DE-9FFB-4D8E-BC03-2D1F6D9359BA@uva.nl> References: <87abbdc58q.fsf@thinkpad.tsdh.de> <6BD7F784-D3F6-4953-9156-11A9F3136B72@uva.nl> <877i6gcizy.fsf@thinkpad.tsdh.de> 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 1L8Vzz-0001x2-8L for emacs-orgmode@gnu.org; Fri, 05 Dec 2008 03:25:19 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L8Vzw-0001wI-IZ for emacs-orgmode@gnu.org; Fri, 05 Dec 2008 03:25:18 -0500 Received: from [199.232.76.173] (port=57142 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L8Vzw-0001wF-Fy for emacs-orgmode@gnu.org; Fri, 05 Dec 2008 03:25:16 -0500 Received: from ug-out-1314.google.com ([66.249.92.174]:63332) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L8Vzw-0004UD-2k for emacs-orgmode@gnu.org; Fri, 05 Dec 2008 03:25:16 -0500 Received: by ug-out-1314.google.com with SMTP id 36so4502369uga.17 for ; Fri, 05 Dec 2008 00:25:15 -0800 (PST) In-Reply-To: <877i6gcizy.fsf@thinkpad.tsdh.de> 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: Tassilo Horn Cc: emacs-orgmode@gnu.org 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