Hi, Maxim, Thanks for clearing things up. So it seems obvious that the root of the problem is in the locales and the collation rules.
The situation is that with locales configured for Spanish from Spain (en_ES.UTF-8) the list is not ordered correctly, unless those three spaces from org-sort-remove-invisible are removed. But I couldn't say why or if that would be appropriate as a patch... Regarding the collation rule of forms with emphasis, at least in Spanish these should come after the non-emphasized forms. I don't know if this is a general rule also for other languages (at least it seems more natural that the forms without emphasis are placed before). Best regards, Juan Manuel Maxim Nikulin writes: > I could reproduce such result but I am in doubt if it is a reason to > merge the patch. I believe, the following behavior is almost expected > > list.org: > - v > - /v/ > - /a/ > - a > > LC_COLLATE=C.UTF-8 LC_ALL= LANGUAGE= \ > emacs -Q -L ~/src/org-mode/lisp/ -L ~/src/org-mode/contrib/lisp/ \ > list.org > > (org-sort-list t ?a) > > - /a/ > - /v/ > - a > - v > > LC_COLLATE=en_US.UTF-8 LC_ALL= LANGUAGE= \ > emacs -Q -L ~/src/org-mode/lisp/ -L ~/src/org-mode/contrib/lisp/ \ > list.org > > (org-sort-list t ?a) > > - /a/ > - a > - /v/ > - v > > Collation rules depend on language. The question is if emphasized > variant should be sorted first. > > P.S. The thread is broken. Some new messages do not have proper > In-Reply-To header. Original question was not referenced in the > message with patch as well: > https://orgmode.org/list/87blbac0k0....@posteo.net/