From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: char equivalence classes in search - why not symmetric? Date: Tue, 1 Sep 2015 17:33:37 -0700 (PDT) Message-ID: References: <2a7b9134-af2a-462d-af6c-d02bad60bbe8@default> <55E5C9AC.3010007@lanl.gov> <55E5F112.3090908@lanl.gov> <87fv2xpxll.fsf@mail.linkov.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1441154054 6080 80.91.229.3 (2 Sep 2015 00:34:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 2 Sep 2015 00:34:14 +0000 (UTC) Cc: emacs-devel@gnu.org To: Juri Linkov , Davis Herring Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 02 02:34:01 2015 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 1ZWw00-0007FL-Ik for ged-emacs-devel@m.gmane.org; Wed, 02 Sep 2015 02:34:00 +0200 Original-Received: from localhost ([::1]:59812 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWw00-000758-7j for ged-emacs-devel@m.gmane.org; Tue, 01 Sep 2015 20:34:00 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51942) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWvzm-00074C-0Y for emacs-devel@gnu.org; Tue, 01 Sep 2015 20:33:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZWvzg-0002sX-NS for emacs-devel@gnu.org; Tue, 01 Sep 2015 20:33:45 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:26473) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWvzg-0002sT-Gz for emacs-devel@gnu.org; Tue, 01 Sep 2015 20:33:40 -0400 Original-Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t820XddT025678 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 2 Sep 2015 00:33:39 GMT Original-Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0022.oracle.com (8.13.8/8.13.8) with ESMTP id t820Xcxm031078 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Wed, 2 Sep 2015 00:33:39 GMT Original-Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by userv0122.oracle.com (8.13.8/8.13.8) with ESMTP id t820Xcie007994; Wed, 2 Sep 2015 00:33:38 GMT In-Reply-To: <87fv2xpxll.fsf@mail.linkov.net> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6691.5000 (x86)] X-Source-IP: aserv0022.oracle.com [141.146.126.234] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 141.146.126.69 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:189436 Archived-At: > Or in a brief table: >=20 > =E2=80=98C-s a=E2=80=99 matches [aA] > =E2=80=98C-s a M-c=E2=80=99 matches [a] > =E2=80=98C-s A=E2=80=99 matches [A] > =E2=80=98C-s A M-c=E2=80=99 matches [aA] >=20 > Substituting =E2=80=98A=E2=80=99 into =E2=80=98=C3=A4=E2=80=99 (other equ= ivalent chars omitted for brevity): >=20 > =E2=80=98C-s a=E2=80=99 matches [a=C3=A4] > =E2=80=98C-s a M-'=E2=80=99 matches [a] > =E2=80=98C-s =C3=A4=E2=80=99 matches [=C3=A4] > =E2=80=98C-s =C3=A4 M-'=E2=80=99 matches [a=C3=A4] >=20 > I see no problem implementing the same. Did you mean `M-s '' insteaed of `M-''? If so, except for the last line, that's what we have now, IIUC. And yes, that would be one way to do it (get the 4 match possibilities I requested). Gets my vote. > BTW, could this scheme be applied to whitespace matching as well? >=20 > =E2=80=98C-s SPC=E2=80=99 matches [SPC TAB] > =E2=80=98C-s SPC M-s SPC=E2=80=99 matches [SPC] > =E2=80=98C-s TAB=E2=80=99 matches [TAB] > =E2=80=98C-s TAB M-s SPC=E2=80=99 matches [SPC TAB] Sounds good to me. Again, gets my vote. But in each case, I would want there to be a user option that controls the default behavior, just as `case-fold-search' does. That should be the first fix, as I mentioned earlier: change `character-fold-search' to a defcustom. Let a user decide which default behavior s?he wants for char folding - and whitespace folding as well. It is very handy to me that search always starts by default by respecting case, because my customized value of=20 `case-fold-search' is nil. I would not want to have to do `M-c' each time I start a search. Likewise, for char folding (`M-s '') and whitespace folding (`M-s SPC'). > > How did that upper-case letter get there? Commands like C-w are carefu= l > > not to add uppercase letters if there aren't already some. So the user > > must have typed it explicitly, and so they were paying attention to cas= e > > and have no need for a case-insensitive search. The only harm is if > > they are inconsistent in their typing -- during something as brief as > > isearch. >=20 > Yanking a string with upper-case letters into Isearch does more harm > by converting them into lower-case. I believe yanking a string > should not strip diacritics either. That too gets my vote - WYYIWYG: what you yank is what you get.