From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: ASCII-folded search [was: Re: Upcoming loss of usability ...] Date: Thu, 25 Jun 2015 00:44:47 +0300 Organization: LINKOV.NET Message-ID: <87616c94g4.fsf@mail.linkov.net> References: <20150615142237.GA3517@acm.fritz.box> <557F3C22.4060909@cs.ucla.edu> <5580D356.4050708@cs.ucla.edu> <87si9qonxb.fsf@gnu.org> <87ioamz8if.fsf@petton.fr> <32013464-2300-46c6-ba46-4a3c36bfee5d@default> <87twu62nnt.fsf@mbork.pl> <87oakdfwim.fsf@uwakimon.sk.tsukuba.ac.jp> <83wpz1lh7c.fsf@gnu.org> <83oakdl7yj.fsf@gnu.org> <83ioall3x5.fsf@gnu.org> <87h9pzxtyi.fsf@mail.linkov.net> <87k2uudoqr.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 1435182601 32273 80.91.229.3 (24 Jun 2015 21:50:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 24 Jun 2015 21:50:01 +0000 (UTC) Cc: "Stephen J. Turnbull" , Eli Zaretskii , Stefan Monnier , emacs-devel To: Artur Malabarba Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 24 23:49:50 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 1Z7sYB-0007ov-E9 for ged-emacs-devel@m.gmane.org; Wed, 24 Jun 2015 23:49:43 +0200 Original-Received: from localhost ([::1]:53098 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7sYA-0002vH-Nx for ged-emacs-devel@m.gmane.org; Wed, 24 Jun 2015 17:49:42 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39308) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7sY7-0002v0-E0 for emacs-devel@gnu.org; Wed, 24 Jun 2015 17:49:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z7sY6-0000sF-Em for emacs-devel@gnu.org; Wed, 24 Jun 2015 17:49:39 -0400 Original-Received: from sub3.mail.dreamhost.com ([69.163.253.7]:40927 helo=homiemail-a100.g.dreamhost.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7sY0-0000ok-Ov; Wed, 24 Jun 2015 17:49:32 -0400 Original-Received: from homiemail-a100.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a100.g.dreamhost.com (Postfix) with ESMTP id E189631A061; Wed, 24 Jun 2015 14:49:31 -0700 (PDT) Original-Received: from localhost.linkov.net (m83-191-167-128.cust.tele2.ee [83.191.167.128]) (Authenticated sender: jurta@jurta.org) by homiemail-a100.g.dreamhost.com (Postfix) with ESMTPA id 21D0A31A075; Wed, 24 Jun 2015 14:49:29 -0700 (PDT) In-Reply-To: (Artur Malabarba's message of "Wed, 24 Jun 2015 09:03:48 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (x86_64-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-Received-From: 69.163.253.7 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:187500 Archived-At: > It's easy for things like =E2=80=9C=E2=93=90=E2=80=9D or =E2=80=9C=C3=A1= =E2=80=9D, which are single characters, > normalizing a combination of multiple characters (like =E2=80=9Ca=CC=81= =E2=80=9D) can get a > little complicated. But then, I don't think we want to do either. I'm testing your changes right now and noticed the following problem: 0. emacs -Q 1. C-h H (=E2=80=98view-hello-file=E2=80=99) 2. C-s i (search for =E2=80=98i=E2=80=99) matches such substrings as =E2=80=9Cin=E2=80=9D, =E2=80=9Civ=E2=80=9D, =E2= =80=98ii=E2=80=99 =E2=80=A6 Maybe we should add explicit exceptions for such cases? >> (define-key isearch-mode-map "\M-sd" 'isearch-toggle-character-fold) >> (defun isearch-toggle-character-fold () >> (interactive) >> (setq isearch-word (unless (eq isearch-word 'isearch--character-fold= ed-regexp) >> 'isearch--character-folded-regexp)) >> (if isearch-word (setq isearch-regexp nil)) >> (setq isearch-success t isearch-adjusted t) >> (isearch-update)) >> (put 'isearch--character-folded-regexp 'isearch-message-prefix "char-f= old ") > > Thanks, I was meaning to look into how to make it toggleable. Will > that snippet make it ON by default? If not, how could I do that? It doesn't enable by default, so it could be combined with the same logic like in =E2=80=98isearch-toggle-case-fold=E2=80=99. In any case we have = to find a good mnemonic key binding to toggle the new character-folding mode.