all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Inconsistent org-sort numeric
@ 2024-09-06 23:11 Kepa
  2024-09-09 18:17 ` Ihor Radchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Kepa @ 2024-09-06 23:11 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 361 bytes --]

Hi

It seems inconsistent, org-sort numeric.
If org-sort numeric is applied to each of these one level headlines, the order is different in both (tested with emacs -q):


* Inconsistent org-sort. M-x org-sort numeric
** !Cuatro
** ~Cinco
** Tres
** 1
** 2

* Inconsistent org-sort. M-x org-sort numeric
** Tres
** !Cuatro
** ~Cinco
** 1
** 2

[-- Attachment #2: Type: text/html, Size: 2625 bytes --]

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

* Re: Inconsistent org-sort numeric
  2024-09-06 23:11 Inconsistent org-sort numeric Kepa
@ 2024-09-09 18:17 ` Ihor Radchenko
  0 siblings, 0 replies; 3+ messages in thread
From: Ihor Radchenko @ 2024-09-09 18:17 UTC (permalink / raw)
  To: Kepa; +Cc: emacs-orgmode@gnu.org

Kepa <gnu.cognition199@slmails.com> writes:

> It seems inconsistent, org-sort numeric.
> If org-sort numeric is applied to each of these one level headlines, the order is different in both (tested with emacs -q):
>
>
> * Inconsistent org-sort. M-x org-sort numeric
> ** !Cuatro
> ** ~Cinco
> ** Tres
> ...
>
> ** Tres
> ** !Cuatro
> ** ~Cinco

Your example is ambiguous.
How exactly do you expect _numeric_ sort to order non-numbers?

As an implementation detail, org-sort treats all the non-numbers as
0-es. It also does not re-order items with the same sorting key.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


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

* Re: Inconsistent org-sort numeric
@ 2024-09-11  6:28 Kepa
  0 siblings, 0 replies; 3+ messages in thread
From: Kepa @ 2024-09-11  6:28 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org, Ihor Radchenko

[-- Attachment #1: Type: text/plain, Size: 148 bytes --]

I thought it would be similar to alphabetical sort, where numbers are ordered although they are not part of the alphabet.

If it's as intended, ok.

[-- Attachment #2: Type: text/html, Size: 556 bytes --]

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

end of thread, other threads:[~2024-09-11  6:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-06 23:11 Inconsistent org-sort numeric Kepa
2024-09-09 18:17 ` Ihor Radchenko
  -- strict thread matches above, loose matches on Subject: below --
2024-09-11  6:28 Kepa

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.