From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Spreadsheet bug? Date: Mon, 3 Aug 2009 06:31:18 +0200 Message-ID: <24CB4D3A-64EE-4E9A-A00B-9C58591C6299@gmail.com> References: <20090723160554.5AA76324F7@mailhost.cs.tu-berlin.de> <4A697CFA.6050001@cs.tu-berlin.de> Mime-Version: 1.0 (Apple Message framework v935.3) 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 1MXpCq-0004yA-5r for emacs-orgmode@gnu.org; Mon, 03 Aug 2009 00:31:28 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MXpCl-0004wp-CA for emacs-orgmode@gnu.org; Mon, 03 Aug 2009 00:31:27 -0400 Received: from [199.232.76.173] (port=52705 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MXpCl-0004wi-8r for emacs-orgmode@gnu.org; Mon, 03 Aug 2009 00:31:23 -0400 Received: from mail-ew0-f211.google.com ([209.85.219.211]:64591) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MXpCk-0001tv-LP for emacs-orgmode@gnu.org; Mon, 03 Aug 2009 00:31:22 -0400 Received: by ewy7 with SMTP id 7so1038724ewy.42 for ; Sun, 02 Aug 2009 21:31:21 -0700 (PDT) In-Reply-To: <4A697CFA.6050001@cs.tu-berlin.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: Stephan Schmitt Cc: emacs-orgmode@gnu.org On Jul 24, 2009, at 11:20 AM, Stephan Schmitt wrote: > Andreas Burtzlaff wrote: >> On Thu, 23 Jul 2009 02:29:30 +0200 meingbg wrote: >>>> | a | b | c | >>>> |---+----+---| >>>> | a | 2 | 2 | >>>> | b | 3 | 7 | >>>> | c | -3 | 4 | >>>> | d | 5 | 9 | >>>> #+TBLFM: $3=$2+@-1::@2$3=$2 >> > >> If @2$3 is manually set to 2 in the table, then the formulas produce >> the expected outcome. So, the problem seems to be the order of >> execution. If column c is cleared and the formulas are executed, @2$3 >> is read to be 0 for the summation and is set to 2 only afterwards. >> Swapping the order in the TBLFM line doesn't help. >> >> Is the order something like field formulas after column formulas? >> Any chance to influence that? > > Evaluating the field formulas before the column formulas is in > general a bad > idea. Results of the field formulas will always be overwritten by > the column > formulas (if there is a conflict). When recomputing a table, Org evaluates field formulas first. Then it does the column formulas, but never overwrites a field that was filled with a field formula. As mentioned elsewhere in this thread > > Here you need to evaluate the spreadsheet twice to yield the > intended result (I > get a 5 in field @2$3). Indeed, this is what is needed here. - Carsten > From info:org:Updating the table: > >> `C-u C-u C-c *' >> `C-u C-u C-c C-c' >> Iterate the table by recomputing it until no further changes >> occur. >> This may be necessary if some computed fields use the value of >> other fields that are computed later in the calculation sequence. > > hth, > Stephan > > > _______________________________________________ > 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