From: Bruno Barbier <brubar.cs@gmail.com>
To: Uwe Brauer <oub@mat.ucm.es>, emacs-orgmode@gnu.org
Subject: Re: [more absurd] (was: org-table-sort-lines (numerically) leaves 0 separated)
Date: Sun, 03 Jul 2022 21:11:44 +0200 [thread overview]
Message-ID: <E1o84yk-0002Rr-Do@lists.gnu.org> (raw)
In-Reply-To: <87o7y6aw8l.fsf@mat.ucm.es>
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
next prev parent reply other threads:[~2022-07-03 19:10 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-01 5:31 org-table-sort-lines (numerically) leaves 0 separated Uwe Brauer
2022-07-03 18:26 ` [more absurd] (was: org-table-sort-lines (numerically) leaves 0 separated) Uwe Brauer
2022-07-03 19:11 ` Bruno Barbier [this message]
2022-07-03 19:29 ` [more absurd] Uwe Brauer
2022-07-03 19:44 ` Bruno Barbier
2022-07-03 19:58 ` Uwe Brauer
2022-07-03 20:14 ` Bruno Barbier
2022-07-03 20:24 ` Uwe Brauer
2022-07-04 4:31 ` tomas
2022-07-04 5:10 ` Uwe Brauer
2022-07-04 6:23 ` tomas
2022-07-04 6:46 ` Martin Steffen
2022-07-04 7:42 ` Uwe Brauer
2022-07-04 12:16 ` tomas
2022-07-04 13:59 ` Uwe Brauer
2022-07-04 12:12 ` tomas
2022-07-04 13:18 ` Martin Steffen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1o84yk-0002Rr-Do@lists.gnu.org \
--to=brubar.cs@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=oub@mat.ucm.es \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).