GNU bug report logs - #20975
Replacing text add also the comma

Previous Next

Package: emacs;

Reported by: Angelo Graziosi <angelo.graziosi <at> alice.it>

Date: Fri, 3 Jul 2015 22:16:01 UTC

Severity: normal

Done: Artur Malabarba <bruce.connor.am <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #13 received at 20975 <at> debbugs.gnu.org (full text, mbox):

From: Artur Malabarba <bruce.connor.am <at> gmail.com>
To: Juri Linkov <juri <at> linkov.net>
Cc: 20975 <at> debbugs.gnu.org, Angelo Graziosi <angelo.graziosi <at> alice.it>
Subject: Re: bug#20975: Replacing text add also the comma
Date: Sat, 4 Jul 2015 22:31:45 +0100
[Message part 1 (text/plain, inline)]
On Jul 4, 2015 10:07 PM, "Juri Linkov" <juri <at> linkov.net> wrote:
>
> >
> '8' matches the adjacent comma because (character-fold-to-regexp "8")
> contains "8[,.]"
>
> The culprit is #x1f109 “DIGIT EIGHT COMMA” with decomposition: (compat
> '8' ',') and #x248f “DIGIT EIGHT FULL STOP” with decomposition: (compat
> '8' '.')
>
> We don't need to match the decomposition “8,” when searching for “8”.
> We only need to match the char #x1f109 when searching for “8”.
>
> Maybe Artur has an idea how to fix this regexp?

Yes, it's simple enough to fix.
The reason why we set characters to also match the decomposition of other
unicode characters is that this lets us match a letter combined with a non
spacing accent.
Within that, I've already added a clause to avoid matching when the
decomposition has more than one letter (this prevents "a" from matching
"am").

Clearly, we need another clause to avoid this situation here.
If no one has a different opinion, I'll add a clause so that a
decomposition is folded only if it contains at least one non-spacing
character. (though I'm not sure how to check for this, at the phone right
now).

That would fix this situation, and wouldn't affect how ascii characters are
allowed to match unicode characters. This would only affect how ascii
characters are allowed to match decompositions.
[Message part 2 (text/html, inline)]

This bug report was last modified 9 years and 327 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.