emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [more absurd] (was: org-table-sort-lines (numerically) leaves 0 sepa


From: Bruno Barbier
Subject: Re: [more absurd] (was: org-table-sort-lines (numerically) leaves 0 separated)
Date: Sun, 03 Jul 2022 21:11:44 +0200

Uwe Brauer <oub@mat.ucm.es> writes:

> Consider 
>
> | 2 |
> | 1 |
> | 1 |
> | 0 |
> |   |
> |   |
>
> (org-table-sort-lines nil nil nil nil t) (numerically 'n' gives)
...
>
> So no empty lines, what the hell is going on here?


The reason is probably that the function 'string-to-number' return 0 for
anything that cannot be converted to a number.

Thus, as far as sorting is concerned, "not a number cells" and "cells
containing zeros" are the same and can be put in any arbitrary order.

Maybe org should handle NaN cells in a better way.

Bruno









reply via email to

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