emacs-devel
[Top][All Lists]
Advanced

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

Re: search-default-mode char-fold-to-regexp and Greek Extended block cha


From: Juri Linkov
Subject: Re: search-default-mode char-fold-to-regexp and Greek Extended block characters
Date: Fri, 26 Jul 2019 21:40:58 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)

>> > But this one I donʼt understand. Searching for iota (capital or small)
>> > in a buffer containing ΐ ΐ or Ϊ́ already works with
>> > char-fold-to-regexp, so why is this needed?
>>
>> Searching for ι finds ΐ only when searching for a single letter ι
>> because the search matches the first part of ΐ that contains the base
>> character ι and ignores the remaining combining accents like ̈́
>>
>> So for testing you need to search for longer strings, e.g.
>> in a buffer with this text "ΐΐΪ́." try to search for "ιιι."
>>
>> It fails to find this text without adding (?ι "ΐ")
>> to char-fold-include.
>
> Maybe we should decide that this is a limitation of the current
> implementation, and instead work on a more correct implementation,
> which actually "folds" characters to their base variants as the search
> proceed.
>
> Let's not forget that the current implementation was known to be
> limited from the get-go, and we only accepted it because the "full"
> one was too complex and required non-trivial changes on the C level.
> So we shouldn't go too far into making the current implementation
> support everything that the full one will inherently support.

I consider the current regexp-based implementation as a fully functional
prototype with complete test coverage, so after switching the
implementation later to C, the same tests should still pass.



reply via email to

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