emacs-devel
[Top][All Lists]
Advanced

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

Re: Questions about isearch


From: Artur Malabarba
Subject: Re: Questions about isearch
Date: Wed, 25 Nov 2015 21:49:58 +0000

On 25 Nov 2015 8:36 pm, "Eli Zaretskii" <address@hidden> wrote:
>
> > Date: Wed, 25 Nov 2015 20:14:06 +0000
> > From: Artur Malabarba <address@hidden>
> > Cc: emacs-devel <address@hidden>
> >
> > > 1. Character folding doesn't catch ligatures, such as æ (should it match
> > > the two characters "ae")?
> >
> > I've no idea. It would be easy to add.
>
> No, I meant to ask why it doesn't work already.  AFAIU, the
> decomposition of ff is "ff":
>
>   (get-char-code-property ?ff 'decomposition)
>     => (compat 102 102)
>
> but searching for 'f' doesn't match the ligature.  (æ doesn't have a
> decomposition in the Unicode database, so maybe it's a different
> case.)

I see. I thought this was a case of adding an adhoc rule.
I'll have to look into it over the weekend to see why f doesn't match ff.

> > > 2. It also doesn't match ä (a single character) with ä (2 characters,
> > > which Emacs correctly composes into 1 grapheme cluster). Should it?
> >
> > Possibly. Since they look the same, might make things easier on users. But I
> > wouldn't know as I've never seen the second version used anywhere.
>
> Once again, the decomposition attribute says we should match them:
>
>   (get-char-code-property ?ä 'decomposition)
>     => (97 776)
>
> and the second character in ä is U+0308 = 776.  Doesn't that say we
> should have matched them?

That's different. Currently we use the decomposition attribute to decide that "a"  should match ä. Our approach so far has been that searching for the "easy to type" characters should match the "hard to type" characters, but searching for the "hard to type" characters will only match the character itself. So right now it is working as intended.

We can (and I think we should) extend that last case so that searching for the "hard to type" characters will only match the character itself or its exact decomposition.


reply via email to

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