Hello, Hendrik Tews <hend...@askra.de> writes:
> I am not sure I understand the check > > (when (or (not (string-match-p "[0-9]" value)) > (and (string-match-p "[1-9]" value) > (= 0 (string-to-number value)))) > > before the error message. Wouldn't it be good enough to apply the > format on the result of string-to-number? This would permit to > have markers "TODO" or "XXX" without getting an error. The point is that format strings in summary operators are reserved for numbers. There is no point to have a "TODO" or a "XXX" value in a column that is summarized with {+;%.2f}. The intent of the check is to warn the user that a columns contains invalid values. Applying `string-to-number' unconditionally could give strange results for example, with {mean,%.2f}. > Moreover, the test is wrong for legitimate numbers such as "0e3" > while it permits non-numbers such as "1XX". I genuinely thought this would return "0". Anyway, the difficulty is to properly check we're applying the format string on numbers. It may not be possible to do so in the general case, so yes, we may fall-back to unconditional `string-to-number'. Regards, -- Nicolas Goaziou