[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 02:12:01 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) |
> >> Done as f9337bc36d
> Juri> Thanks! Could you please look why tests fail to validate matching
> of
> Juri> n-level decomposition. The character with 3 level decomposition in
> Juri> char-fold--test-without-customization is currently commented out as
> Juri> FIXME. After uncommenting this test fails, and I don't understand
> why.
>
> That test ends up doing
>
> (string-match "\\`\\(?:ι[̀́̄̆̈̓̔͂]\\|[ΐίιϊἰ-ἷὶίιῐ-ΐῖῗ𝛊𝜄𝜾𝝸𝞲]\\)\\'" "Ϊ́")
>
> 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. So I guess we need to add (?ι "ΐ")
for the tests to pass:
diff --git a/test/lisp/char-fold-tests.el b/test/lisp/char-fold-tests.el
index e519435ef0..3819f3919d 100644
--- a/test/lisp/char-fold-tests.el
+++ b/test/lisp/char-fold-tests.el
@@ -166,6 +165,7 @@ char-fold--test-with-customization
(let* ((char-fold-include
'(
(?ß "ss") ;; de
+ (?ι "ΐ") ;; el
(?o "ø") ;; da no nb nn
(?l "ł") ;; pl
))
@@ -184,9 +184,7 @@ char-fold--test-with-customization
'(
("e" "ℯ" "ḗ" "ë" "ë")
("е" "ё" "ё")
- ("ι" "ί" "ί"
- ;; FIXME: "ΐ"
- )
+ ("ι" "ί" "ί" "ΐ")
("ß" "ss")
("o" "ø")
("l" "ł")
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:
diff --git a/lisp/char-fold.el b/lisp/char-fold.el
index f379229e6c..c4add03bd9 100644
--- a/lisp/char-fold.el
+++ b/lisp/char-fold.el
@@ -27,7 +27,8 @@
(defconst char-fold--default-include
'((?\" """ "“" "”" "”" "„" "⹂" "〞" "‟" "‟" "❞" "❝" "❠" "“" "„" "〝" "〟" "🙷"
"🙶" "🙸" "«" "»")
(?' "❟" "❛" "❜" "‘" "’" "‚" "‛" "‚" "" "❮" "❯" "‹" "›")
- (?` "❛" "‘" "‛" "" "❮" "‹")))
+ (?` "❛" "‘" "‛" "" "❮" "‹")
+ (?ι "ΐ")))
(defconst char-fold--default-exclude nil)
(defconst char-fold--default-symmetric nil)
(defconst char-fold--previous (list char-fold--default-include
diff --git a/test/lisp/char-fold-tests.el b/test/lisp/char-fold-tests.el
index e519435ef0..3819f3919d 100644
--- a/test/lisp/char-fold-tests.el
+++ b/test/lisp/char-fold-tests.el
@@ -154,8 +154,7 @@ char-fold--test-without-customization
("ι"
"ί" ;; 1 level decomposition
"ί" ;; 2 level decomposition
- ;; FIXME:
- ;; "ΐ" ;; 3 level decomposition
+ "ΐ" ;; 3 level decomposition
)
)))
(dolist (strings matches)
- Re: search-default-mode char-fold-to-regexp and Greek Extended block characters, (continued)
- Re: search-default-mode char-fold-to-regexp and Greek Extended block characters, Robert Pluim, 2019/07/19
- Re: search-default-mode char-fold-to-regexp and Greek Extended block characters, Eli Zaretskii, 2019/07/19
- Re: search-default-mode char-fold-to-regexp and Greek Extended block characters, Robert Pluim, 2019/07/21
- Re: search-default-mode char-fold-to-regexp and Greek Extended block characters, Robert Pluim, 2019/07/22
- Re: search-default-mode char-fold-to-regexp and Greek Extended block characters, Eli Zaretskii, 2019/07/23
- Re: search-default-mode char-fold-to-regexp and Greek Extended block characters, Robert Pluim, 2019/07/23
- Re: search-default-mode char-fold-to-regexp and Greek Extended block characters, Juri Linkov, 2019/07/23
- Re: search-default-mode char-fold-to-regexp and Greek Extended block characters, Robert Pluim, 2019/07/24
- Re: search-default-mode char-fold-to-regexp and Greek Extended block characters, Robert Pluim, 2019/07/24
- Re: search-default-mode char-fold-to-regexp and Greek Extended block characters, Robert Pluim, 2019/07/24
- Re: search-default-mode char-fold-to-regexp and Greek Extended block characters,
Juri Linkov <=
- Re: search-default-mode char-fold-to-regexp and Greek Extended block characters, Basil L. Contovounesios, 2019/07/24
- Re: search-default-mode char-fold-to-regexp and Greek Extended block characters, Juri Linkov, 2019/07/25
- Re: search-default-mode char-fold-to-regexp and Greek Extended block characters, Re: search-default-mode char-fold-to-regexp and Greek Extended block characters, Robert Pluim, 2019/07/25
- Re: search-default-mode char-fold-to-regexp and Greek Extended block characters, Re: search-default-mode char-fold-to-regexp and Greek Extended block characters, Juri Linkov, 2019/07/25
- Re: search-default-mode char-fold-to-regexp and Greek Extended block characters, Re: search-default-mode char-fold-to-regexp and Greek Extended block characters, Robert Pluim, 2019/07/26
- Re: search-default-mode char-fold-to-regexp and Greek Extended block characters, Re: search-default-mode char-fold-to-regexp and Greek Extended block characters, Juri Linkov, 2019/07/26
- Re: search-default-mode char-fold-to-regexp and Greek Extended block characters, Robert Pluim, 2019/07/29
- Re: search-default-mode char-fold-to-regexp and Greek Extended block characters, Juri Linkov, 2019/07/29
- Re: search-default-mode char-fold-to-regexp and Greek Extended block characters, Robert Pluim, 2019/07/30
- Re: search-default-mode char-fold-to-regexp and Greek Extended block characters, Eli Zaretskii, 2019/07/30