From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#22147: Obsolete search-forward-lax-whitespace Date: Wed, 16 Dec 2015 02:57:42 +0200 Organization: LINKOV.NET Message-ID: <874mfjchp1.fsf@mail.linkov.net> References: <87wpsk7dcs.fsf@mail.linkov.net> <87d1ubz3w9.fsf@mail.linkov.net> <87r3ipoofk.fsf@mail.linkov.net> <87zixcblno.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 1450229361 5896 80.91.229.3 (16 Dec 2015 01:29:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 16 Dec 2015 01:29:21 +0000 (UTC) Cc: 22147@debbugs.gnu.org To: Artur Malabarba Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Dec 16 02:29:13 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1a90u0-000704-KV for geb-bug-gnu-emacs@m.gmane.org; Wed, 16 Dec 2015 02:29:12 +0100 Original-Received: from localhost ([::1]:39850 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a90u0-0007yH-0Q for geb-bug-gnu-emacs@m.gmane.org; Tue, 15 Dec 2015 20:29:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33459) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a90tu-0007y0-1g for bug-gnu-emacs@gnu.org; Tue, 15 Dec 2015 20:29:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a90tq-0003ZZ-Sf for bug-gnu-emacs@gnu.org; Tue, 15 Dec 2015 20:29:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45471) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a90tq-0003ZT-PL for bug-gnu-emacs@gnu.org; Tue, 15 Dec 2015 20:29:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1a90tq-0002Hj-FY for bug-gnu-emacs@gnu.org; Tue, 15 Dec 2015 20:29:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 16 Dec 2015 01:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22147-submit@debbugs.gnu.org id=B22147.14502292908722 (code B ref 22147); Wed, 16 Dec 2015 01:29:02 +0000 Original-Received: (at 22147) by debbugs.gnu.org; 16 Dec 2015 01:28:10 +0000 Original-Received: from localhost ([127.0.0.1]:53072 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1a90t0-0002Gb-4Y for submit@debbugs.gnu.org; Tue, 15 Dec 2015 20:28:10 -0500 Original-Received: from sub3.mail.dreamhost.com ([69.163.253.7]:49034 helo=homiemail-a18.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1a90sx-0002GT-Nv for 22147@debbugs.gnu.org; Tue, 15 Dec 2015 20:28:08 -0500 Original-Received: from homiemail-a18.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a18.g.dreamhost.com (Postfix) with ESMTP id 5EB4D25006B; Tue, 15 Dec 2015 17:28:04 -0800 (PST) Original-Received: from localhost.linkov.net (m83-180-31-224.cust.tele2.ee [83.180.31.224]) (Authenticated sender: jurta@jurta.org) by homiemail-a18.g.dreamhost.com (Postfix) with ESMTPA id 71848250069; Tue, 15 Dec 2015 17:28:03 -0800 (PST) In-Reply-To: (Artur Malabarba's message of "Tue, 15 Dec 2015 10:15:56 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (x86_64-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:110040 Archived-At: >>> (defun my-lax-with-char-fold (s &optional l) >>> (character-fold-to-regexp (replace-regexp-in-string "\t\n\r\s+" " "= s) >>> l)) >>> >>> And then also set search-whitespace-regexp like above. >> >> Thanks for the suggestion. Since it works, then maybe better >> generalize it to allow a mode that supports normalization of >> the search string, that also will do symmetric char-folding, >> where e.g. searching for =E2=80=9C=C3=A4=E2=80=9D will match =E2=80=9C= a=E2=80=9D, etc. > > I don't know what you mean. IIUC, the current framework already > supports a "normalizing mode", which is what we just did here, isn't > it? I mean a char-folding customization that allows a search for =E2=80=9C=C3=A4=E2=80=9D match =E2=80=9Ca=E2=80=9D. Is this already = possible? If yes, then it should be easy to customize it in such a way that =E2=80=9C\n=E2=80=9D will match space =E2=80=9C\s=E2=80=9D to avoid the n= eed to write own functions that define an intersection of the existing functions char-folding and lax-whitespace. IOW, to customize a char-folding option instead of search-default-regexp-mode?