From mboxrd@z Thu Jan 1 00:00:00 1970 From: William Henney Subject: A table formula bug: incremental column fill with negative values Date: Fri, 23 Apr 2010 23:03:10 -0500 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O5WaM-00017f-4I for emacs-orgmode@gnu.org; Sat, 24 Apr 2010 00:03:18 -0400 Received: from [140.186.70.92] (port=58537 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O5WaH-00017V-MJ for emacs-orgmode@gnu.org; Sat, 24 Apr 2010 00:03:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O5WaG-0005qU-AY for emacs-orgmode@gnu.org; Sat, 24 Apr 2010 00:03:13 -0400 Received: from mail-gy0-f169.google.com ([209.85.160.169]:40233) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O5WaG-0005qO-7u for emacs-orgmode@gnu.org; Sat, 24 Apr 2010 00:03:12 -0400 Received: by gyg4 with SMTP id 4so7059212gyg.0 for ; Fri, 23 Apr 2010 21:03:10 -0700 (PDT) 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: emacs-org Hi all The following is using today's git trunk of org-mode with emacs 23.1.94.1 (aquamacs 2.0preview5) Consider the following table | -8 | | | | | | | #+TBLFM: $1=3D@-1 - 1::@1$1=3D-8 Evaluate formulas once (C-u C-c *): | -8 | | -9 | |----| | -1 | Evaluate formulas again (C-u C-c *): | -8 | | -9 | |----| |----| What I expected: | -8 | | -9 | | -10 | | -11 | The problem always seems to start at -10. When I turn on table debugging, it first calculates the -10 value correctly, but then fails to recognise the -10 cell as a number when calculating the next row, using 0 instead, which results in -1. This is because during the intermediate formatting of the cell the minus sign in -10 abuts the column separator: "|-10 |", and the "|-" part is then interpreted as the beginning of an hline. Any possibility of a fix? Just prepending a space to all calculated negative numbers might be enough. Cheers Will --=20 Dr William Henney, Centro de Radioastronom=EDa y Astrof=EDsica, Universidad Nacional Aut=F3noma de M=E9xico, Campus Morelia