emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* A table formula bug: incremental column fill with negative values
@ 2010-04-24  4:03 William Henney
  2010-04-24  8:23 ` Carsten Dominik
  0 siblings, 1 reply; 2+ messages in thread
From: William Henney @ 2010-04-24  4:03 UTC (permalink / raw)
  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=@-1 - 1::@1$1=-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

-- 

  Dr William Henney, Centro de Radioastronomía y Astrofísica,
  Universidad Nacional Autónoma de México, Campus Morelia

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: A table formula bug: incremental column fill with negative values
  2010-04-24  4:03 A table formula bug: incremental column fill with negative values William Henney
@ 2010-04-24  8:23 ` Carsten Dominik
  0 siblings, 0 replies; 2+ messages in thread
From: Carsten Dominik @ 2010-04-24  8:23 UTC (permalink / raw)
  To: William Henney; +Cc: emacs-org

Hi William,

On Apr 24, 2010, at 6:03 AM, William Henney wrote:

> 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=@-1 - 1::@1$1=-8
>
>    Evaluate formulas once (C-u C-c *):
>
>    | -8 |
>    | -9 |
>    |----|
>    | -1 |
>
>    Evaluate formulas again (C-u C-c *):
>
>    | -8 |
>    | -9 |
>    |----|
>    |----|


:-) this is a nice bug.  Thanks for your report and analysis - I just
checked in a fix.

- Carsten

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-04-24  8:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-24  4:03 A table formula bug: incremental column fill with negative values William Henney
2010-04-24  8:23 ` Carsten Dominik

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).