GNU bug report logs -
#59275
Unexpected return value of `string-collate-lessp' on Mac
Previous Next
Full log
Message #29 received at 59275 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
>> Reliable sorting.
>> In particular, I am looking for a better PREDICATE argument for
>> `sort-subr' for case-sensitive and case-insensitive sorting of strings.
>
> In the strict order of Unicode codepoints? Use compare-strings.
Thanks for the clarification.
After further considerations, it looks like we should still use
`string-collate-lessp' on Org side as it yields expected results if libc
properly implements the collation.
>> I'd like the warning to be even more prominent.
>
> You want to make it explicit that for systems where we use
> string-lessp the IGNORE-CASE argument is ignored? Or do you want some
> other change?
Yes, I think.
> Anyway, feel free to suggest some text to that effect.
Maybe change
If your system does not support a locale environment, this function
behaves like `string-lessp'.
to
Some operating systems do not implement correct collation (in specific
locale environments or at all). Then, this functions falls back to
case-sensitive `string-lessp' and IGNORE-CASE argument is ignored.
--
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>
This bug report was last modified 2 years and 176 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.