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: Thu, 25 Jul 2019 21:40:12 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)

>>> because it does (upcase "ΐ") => Ϊ́
>>>
>>> That character is GREEK SMALL LETTER IOTA WITH DIALYTIKA AND OXIA, and
>>> as far as I can tell there is no CAPITAL variant of that letter, so
>>> upcase canʼt return it, which means it returns GREEK CAPITAL LETTER
>>> IOTA plus the diacriticals, which is obviously not going to
>>> match.
>>
>> This is an interesting case like (upcase "ß") => "SS" that required
>> adding (?ß "ss") to pass the tests.
>
> It is probably this way because all caps are not usually (if ever)
> accented in Greek, so the only time upper-case letters take accents is
> at the start of capitalised words, where dialytika can never appear, as
> dialytika only make sense on the second of two consecutive vowels.

Maybe only for searching purposes we could find all cases
where upper- and lower-case letters differ significantly and
add them to char-fold-include by default.

>> So I guess we need to add (?ι "ΐ") for the tests to pass:
>
> [...]
>
>> But this is only for char-fold--test-with-customization.  OTOH, for
>> char-fold--test-without-customization we need also to change the default
>> value in char-fold.el like:
>
> [...]
>
> Can you please explain why iota with dialytika and tonos needs to be
> special-cased in these places?

Here is the test case that demonstrates the need to add it
to char-fold-include:

0. emacs -Q
1. Paste this text to *scratch*: "ΐΐ"
2. Search for two IOTAs with char-fold, e.g.: C-s M-s ' ιι

The char-fold search doesn't match the characters with combining accents
with their base char GREEK SMALL LETTER IOTA.

However, after adding (?ι "ΐ") to char-fold-include it can match the
base character IOTA.



reply via email to

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