all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Maxim Nikulin <m.a.nikulin@gmail.com>
Cc: yantar92@posteo.net, 59275@debbugs.gnu.org
Subject: bug#59275: Unexpected return value of `string-collate-lessp' on Mac
Date: Sun, 27 Nov 2022 16:23:50 +0200	[thread overview]
Message-ID: <83mt8cpjbd.fsf@gnu.org> (raw)
In-Reply-To: <2ed46071-5cd1-67ca-bd95-1c2a3060807d@gmail.com> (message from Maxim Nikulin on Sun, 27 Nov 2022 21:00:50 +0700)

> From: Maxim Nikulin <m.a.nikulin@gmail.com>
> Date: Sun, 27 Nov 2022 21:00:50 +0700
> Cc: 59275@debbugs.gnu.org
> 
> Concerning Org, my point is that caseless sorting should be uniform. 

You need to work hard to get that.  Just using 'downcase' is not enough, and
neither is using 'string-collate-equalp'.

> >> https://nullprogram.com/blog/2014/06/13/ that mentioned something
> >> similar about caveats with composition.
> > 
> > I don't see there anything about sorting or collation.  What did I miss?
> 
> Does not composed/decomposed representation affect comparison result?

They are different texts, so yes, they do, and they should.
If you want to treat such strings as equivalent, you need to work even
harder, since Emacs currently doesn't have enough infrastructure to do it
right in all cases.

> 
> Emacs-devel thread mentioned earlier in this bug contains a link 
> describing enough issues with string comparison:
> 
> https://stackoverflow.com/questions/319426/how-do-i-do-a-case-insensitive-string-comparison

This is about Python, no?

> From my point of view e.g. case transformation rule for Turkish I is a
> minor issue

Why, Org doesn't want to support Turkish users?

> My argument against `downcase' in `string-collate-lessp' is that it may 
> add noticeable performance penalty.

I'd worry about correctness before performance.

> Interestingly `compare-strings' uses upcase conversion when the 
> IGNORE-CASE argument is true. I believed that some implementations 
> (unrelated to Emacs) may have problems with e.g. ß and considered 
> downcase as a safer option.

Case conversions always have problems.





  reply	other threads:[~2022-11-27 14:23 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-15  4:08 bug#59275: Unexpected return value of `string-collate-lessp' on Mac Ihor Radchenko
2022-11-15  9:51 ` Robert Pluim
2022-11-16  3:47   ` Ihor Radchenko
2022-11-15 13:46 ` Eli Zaretskii
2022-11-15 15:05   ` Ihor Radchenko
2022-11-15 15:16     ` Eli Zaretskii
2022-11-16  1:34       ` Ihor Radchenko
2022-11-16 13:00         ` Eli Zaretskii
2022-11-21  7:28           ` Ihor Radchenko
2022-11-21 13:31             ` Eli Zaretskii
2022-11-22  1:24               ` Ihor Radchenko
2022-11-22 12:56                 ` Eli Zaretskii
2022-11-23 10:39                   ` Ihor Radchenko
2022-11-23 14:58                     ` Eli Zaretskii
2022-11-24  2:22                       ` Ihor Radchenko
2022-11-24  7:23                         ` Eli Zaretskii
2022-11-26  2:03                   ` Ihor Radchenko
2022-11-26  8:06                     ` Eli Zaretskii
2022-11-26  8:47                       ` Ihor Radchenko
2022-11-26  9:22                         ` Eli Zaretskii
2022-11-27 14:00                           ` Maxim Nikulin
2022-11-27 14:23                             ` Eli Zaretskii [this message]
2022-11-27 15:19                               ` Maxim Nikulin
2022-11-27 15:42                                 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83mt8cpjbd.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=59275@debbugs.gnu.org \
    --cc=m.a.nikulin@gmail.com \
    --cc=yantar92@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.