bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#20316: 24.5; `string-lessp' doesn't respect value of LC_COLLATE


From: Alexis
Subject: bug#20316: 24.5; `string-lessp' doesn't respect value of LC_COLLATE
Date: Mon, 13 Apr 2015 16:42:30 +1000


Michael Albinus <michael.albinus@gmx.de> writes:

Alexis <flexibeast@gmail.com> writes:

(getenv "LC_COLLATE") => "hr_HR.UTF-8"

(string-lessp "Ć" "D") => nil (string-lessp "Đ" "S") => nil (string-lessp "Š" "Z") => nil

`string-lessp' is not design to respect collation order. The docstring speaks about lexicographoc order.

i'm sorry, i don't follow this. Yes, the docstring talks about lexicographic order. But i think it's reasonable for users to expect Emacs' built-in sort functionality (e.g. `sort-lines') to respect their current locale such that lexicographic order and collation order are treated as basically synonymous. Unless there's an important distinction between the two in this context that i'm missing?

In this specific case, a user of a package i maintain was surprised when `org-sort' didn't sort their Croatian-language Org entries properly. Under the hood, `org-sort' uses `string-lessp'. Is the bottom line that they'll have to wait until at least 25.1 before Org could add conditional code to use `string-collate-lessp', to at least DTRT for users of >25.0?


Alexis.





reply via email to

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