From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Spreadsheet question Date: Thu, 4 Dec 2008 09:06:18 +0100 Message-ID: <6BD7F784-D3F6-4953-9156-11A9F3136B72@uva.nl> References: <87abbdc58q.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 1L89EB-0001Ry-OE for emacs-orgmode@gnu.org; Thu, 04 Dec 2008 03:06:27 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L89EA-0001Ri-Ad for emacs-orgmode@gnu.org; Thu, 04 Dec 2008 03:06:27 -0500 Received: from [199.232.76.173] (port=39123 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L89EA-0001Rf-4X for emacs-orgmode@gnu.org; Thu, 04 Dec 2008 03:06:26 -0500 Received: from mx20.gnu.org ([199.232.41.8]:58455) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L89E8-0002jp-VO for emacs-orgmode@gnu.org; Thu, 04 Dec 2008 03:06:25 -0500 Received: from mu-out-0910.google.com ([209.85.134.185]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L89E7-0008Gg-7K for emacs-orgmode@gnu.org; Thu, 04 Dec 2008 03:06:23 -0500 Received: by mu-out-0910.google.com with SMTP id i2so3587336mue.6 for ; Thu, 04 Dec 2008 00:06:22 -0800 (PST) In-Reply-To: <87abbdc58q.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, @-1 references the row above the current. If that is a hline, if actually references the current line. So you are asking Org-mode to sum lines 2 - 6, which includes the result line. So each time the calculation is done, it add the two ones to the result from the previous calculation. - Carsten On Dec 3, 2008, at 10:34 PM, Tassilo Horn wrote: > Hi all, > > I have this table: > > | header | > |--------| > | 1 | > | 1 | > |--------| > | 0 | > #+TBLFM: @4$1=vsum(@2..@-1) > > The cell containing 0 should sum up all values of the column's rows > above. But C-u C-c C-c gives 2, then 4, then 6, then 8... > > Reading the docs I found out that @-1 won't cross hlines, so now I use > -I instead which works. But still I don't understand the @-1 > behavior. > Even if knowing that it doesn't cross hlines I'd expect it to > calculate > the correct value or at least error because there's no row above @4 > before the next hline. So why is (equal @-1 @0) here? > > Bye, > Tassilo > > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode