From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Dirk-Jan C. Binnema" Newsgroups: gmane.emacs.devel Subject: Re: Character folding in the pretest Date: Thu, 04 Feb 2016 13:57:36 +0200 Message-ID: <87d1sc4rin.fsf@djcbsoftware.nl> References: <87mvriuk3a.fsf@gmail.com> <8737t9ex1p.fsf@petton.fr> <83oabxyf71.fsf@gnu.org> <56B230D1.90902@gmail.com> <87bn7x4i4o.fsf@wanadoo.es> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1454592423 1193 80.91.229.3 (4 Feb 2016 13:27:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 4 Feb 2016 13:27:03 +0000 (UTC) To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 04 14:26:56 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aRJvy-0002Rz-P0 for ged-emacs-devel@m.gmane.org; Thu, 04 Feb 2016 14:26:54 +0100 Original-Received: from localhost ([::1]:41799 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRJvy-0003A2-7i for ged-emacs-devel@m.gmane.org; Thu, 04 Feb 2016 08:26:54 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52019) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRIXl-00032L-IQ for emacs-devel@gnu.org; Thu, 04 Feb 2016 06:57:50 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aRIXi-0002WX-A3 for emacs-devel@gnu.org; Thu, 04 Feb 2016 06:57:49 -0500 Original-Received: from mail-lb0-x22b.google.com ([2a00:1450:4010:c04::22b]:35568) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRIXh-0002WF-Uw for emacs-devel@gnu.org; Thu, 04 Feb 2016 06:57:46 -0500 Original-Received: by mail-lb0-x22b.google.com with SMTP id bc4so29643039lbc.2 for ; Thu, 04 Feb 2016 03:57:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:references:user-agent:to:subject:in-reply-to:date :message-id:mime-version:content-type:content-transfer-encoding; bh=cpbCKcUVTKvqEKD69HBGXAkp2aEJm5XQkCjYCOGsMvg=; b=sDs2ddKaV/HXqP+SFoh8HtJPjXrhdB4FZ4JCcW4kERBAtGU9p3B2Soei7Y0A2bWhNa TVtFp2bpvSNpzkwKvmHPkkipRIz49vm6uZcR+SHqbsLtDMpPy7AzDH3jlqg+HPnWO3tx YvcfRbw3Fhyu4QLtNhEiYtnQRz9BOmIpjL3pKTQzmSoFg6uW2qv9a0QCU6dYxVZj8xeg Ic9T+jJGPL2FB6mcghJlq+7pwurJAjBUB29ebLXBvsJrbeeL407C8YTJIPwcm4HO7X0H EkdEPMGVt5FtNkmUqrr8+y7ZP9uazIG0v0jAKpr6EOzCS4Os0sdr5jeViiR6iaGo/8Sv 9LcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:references:user-agent:to:subject :in-reply-to:date:message-id:mime-version:content-type :content-transfer-encoding; bh=cpbCKcUVTKvqEKD69HBGXAkp2aEJm5XQkCjYCOGsMvg=; b=fLwXrq3GkbhYtGrKmQiDseY1DNHe+B1KY/IC/V7gsfhZSOPXgfFhtSqLWMOFS8YblH yu7Ac0yaF/jaDXPOjjAZCSeq+pYsvAv3NdODf1x4xnvwRn3p9T8WP7k5jr8GL2O/PLUV ohdPOD9l9DcajMXBJj2KlER1Gle82osRgbD92sfUfUWyaiG2ceTnhMnCOQJuYMrJUFZd YTN1/e0RQweN8RNBBQdi4d/YVJyABXY93IVZMWfEiiRT97VutvFVh1129qrK9A/s/bBp IEnln/BJmA7+qXjOgBgMIqK2olLU0FeGCykHkaBrQ1526X8md/8kxy1eLa+qBY7FjAvv 3ovw== X-Gm-Message-State: AG10YOR2HWH/h2fdyqEAQuz/eBjjeAumiF6m/mRQ3h91Cq25Jnwf9cdd4GheNjGVY4K25w== X-Received: by 10.112.167.130 with SMTP id zo2mr2765728lbb.129.1454587064826; Thu, 04 Feb 2016 03:57:44 -0800 (PST) Original-Received: from wintersun ([194.157.99.168]) by smtp.gmail.com with ESMTPSA id aa9sm1518254lbc.16.2016.02.04.03.57.43 for (version=TLSv1/SSLv3 cipher=OTHER); Thu, 04 Feb 2016 03:57:43 -0800 (PST) X-Google-Original-From: Dirk-Jan C. Binnema User-agent: mu4e 0.9.17; emacs 24.5.1 In-reply-to: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c04::22b X-Mailman-Approved-At: Thu, 04 Feb 2016 08:26:32 -0500 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:199294 Archived-At: On Thursday Feb 04 2016, Elias Mårtenson wrote: > On 4 February 2016 at 05:08, Óscar Fuentes 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:djcb@djcbsoftware.nl w:www.djcbsoftware.nl pgp: D09C E664 897D 7D39 5047 A178 E96A C7A1 017D DA3C