emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [PATCH] [BUG] org-table.el: Fix `org-table-eval-formula'


From: Nicolas Goaziou
Subject: Re: [O] [PATCH] [BUG] org-table.el: Fix `org-table-eval-formula'
Date: Fri, 04 Dec 2015 21:40:44 +0100

Hello,

Piotr Gajewski <address@hidden> writes:

> I have found a little bug that results in formulas of a table being
> computed incorrectly. When there are tabs in front of a data row (instead of 
> spaces),
> the list of values extracted from the row contains superfluous items.
> All genuine values are shifted to the right. Consequently, when references
> to fields are resolved, a formula gets the wrong values.
>
> Example:
>
>     |---+------+------+---+----+-----|
>     | ! |  sum |      | a |  b |   c |
>     |---+------+------+---+----+-----|
>     | # | 1011 | 1000 | 1 | 10 | 100 |
>     |---+------+------+---+----+-----|
>     #+TBLFM: $2=$a+$b+$c
>
> The list of extracted values is ("\t" "#" "" "1000" "1" "10" "100").
> Should be ("#" "" "1000" "1" "10" "100").
>
> Piotr Gajewski
>
> From 1c943f1ea833b9cdaa172fd96cf6bf6d86c4d86e Mon Sep 17 00:00:00 2001
> From: Piotr Gajewski <address@hidden>
> Date: Thu, 3 Dec 2015 16:46:32 +0100
> Subject: [PATCH] org-table.el: Fix `org-table-eval-formula'
>
> * lisp/org-table.el (org-table-eval-formula): Fix regexp used for
>   extracting values from fields of a table.
>
> TINYCHANGE

Thanks for the patch. 

However I eventually applied a slightly different one. In particular,
I don't think TAB should be a valid cell alignment character within
a table. IMO, it is only a special character when used in indentation.

Regards,

-- 
Nicolas Goaziou



reply via email to

[Prev in Thread] Current Thread [Next in Thread]