emacs-devel
[Top][All Lists]
Advanced

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

Re: Character folding in the pretest


From: Dirk-Jan C. Binnema
Subject: Re: Character folding in the pretest
Date: Thu, 04 Feb 2016 13:57:36 +0200
User-agent: mu4e 0.9.17; emacs 24.5.1

On Thursday Feb 04 2016, Elias Mårtenson wrote:

> On 4 February 2016 at 05:08, Óscar Fuentes <address@hidden> wrote:
>
> BTW, searching for `n' also matches `ñ', which is definitely wrong.
>> Those are not equivalent characters by any stretch.

> What type of character equivalence should be used is locale-dependent.
> Everybody here agrees with that. Thus, the solution must also be
> locale-dependent.

> It would make sense to have the default based on the session's locale,
> meaning that in a Swedish locale a, ä and å would be different and n and ñ
> be different, but under a Spanish locale, the opposite would be true.

Character equivalence is based on the language(s) of whatever is in your
buffer, which might be correlated with your locale, but not more than
that.

Regardless, for the purpose of searching, my personal preference would
be to make folding rather inclusive; I don't really care about the exact
rules languages have come up for what letters are considered "the same",
I just care for what I, as a user, would find the easiest to match.

So for instance, I'd like "angstrom" to match "Ångström" even though in
Swedish, a/Å and o/ö are not the same. Somewhat similar to how
languages' capitalization rules are ignored when searching
case-insensitively. A few false positives are not much of problem.

That would also get my vote as a reasonable default for case-folding in
searches. But I'll happily take any default, as long as there's a way to
get the above behavior, preferably without having to change my locale.

Kind regards,
Dirk.

-- 
Dirk-Jan C. Binnema                  Helsinki, Finland
e:address@hidden           w:www.djcbsoftware.nl
pgp: D09C E664 897D 7D39 5047 A178 E96A C7A1 017D DA3C



reply via email to

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