On 14/04/2021 02:08, Juan Manuel Macías wrote:

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...

Did not you get a warning like the following one?

(process:220): Gtk-WARNING **: 15:17:45.066: Locale not supported by C library.
        Using the fallback 'C' locale.

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).

LANG=es_ES.UTF-8 \
  emacs -Q -L ~/src/org-mode/lisp/ -L ~/src/org-mode/contrib/lisp/ \
  list.org

- a
- /a/
- v
- /v/

So it works accordingly to your expectation. Emacs 25.2.2, Ubuntu-18.04 container.

I have generated es_ES.UTF-8 locale using

    dpkg-reconfigure locales

Depending on linux distribution you run, the locale may be ready to use or not. I tend to think that in minimal environment of virtual machine it was missed.

I had an idea to add a test for sorting of items including emphasized ones but test-org-list/sort forces C locale. Maybe it was done to avoid failures due to missed locale.


Reply via email to