Re: [DISCUSSION] Sorting strings in Org mode vs. system locale

2024-05-11 Thread Ihor Radchenko
Max Nikulin writes: >> >>> I consider the following as a kind of graceful degradation >>> >>> (defun org-sort-function-fallback-downcase >>> (a b &optional LOCALE IGNORE-CASE) >>>(if ignore-case >>> (string-collate-lessp (downcase a) (downcase b) locale ignore-case) >>> (strin

Re: [DISCUSSION] Sorting strings in Org mode vs. system locale

2024-05-07 Thread Max Nikulin
On 07/05/2024 20:09, Ihor Radchenko wrote: Max Nikulin writes: I consider the following as a kind of graceful degradation (defun org-sort-function-fallback-downcase (a b &optional LOCALE IGNORE-CASE) (if ignore-case (string-collate-lessp (downcase a) (downcase b) locale ignore-ca

Re: [DISCUSSION] Sorting strings in Org mode vs. system locale

2024-05-07 Thread Ihor Radchenko
Max Nikulin writes: > I consider the following as a kind of graceful degradation > > (defun org-sort-function-fallback-downcase > (a b &optional LOCALE IGNORE-CASE) > (if ignore-case > (string-collate-lessp (downcase a) (downcase b) locale ignore-case) >(string-collate-lessp a b lo

Re: [DISCUSSION] Sorting strings in Org mode vs. system locale

2024-05-07 Thread Max Nikulin
On 05/05/2024 18:59, Ihor Radchenko wrote: Ihor Radchenko writes: If a user access same files from Linux and macOS then it may be really annoying to get different order of entries in agenda. For most of Linux users it is better to use more smart `string-collate-lessp'. Some care is required to

Re: [DISCUSSION] Sorting strings in Org mode vs. system locale (was: test-org-table/sort-lines: Failing test on macOS)

2024-05-05 Thread Ihor Radchenko
Ihor Radchenko writes: >> The only additional consideration is that compare function should be >> configurable. If a user access same files from Linux and macOS then it >> may be really annoying to get different order of entries in agenda. For >> most of Linux users it is better to use more sm

[DISCUSSION] Sorting strings in Org mode vs. system locale (was: test-org-table/sort-lines: Failing test on macOS)

2024-04-03 Thread Ihor Radchenko
Max Nikulin writes: >> This sounds like something to be adapted to Emacs upstream. >> I suggested to change `string-collate-lessp' fallback behaviour to use >> `downcase' when IGNORE-CASE is non-nil. See my last message in >> bug#59275. > > I do not share Eli's position "all or nothing". I prefer