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: Sat, 12 Dec 2015 01:52:03 +0200 Organization: LINKOV.NET Message-ID: <87wpsk7dcs.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 1449878067 19551 80.91.229.3 (11 Dec 2015 23:54:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 11 Dec 2015 23:54:27 +0000 (UTC) To: 22147@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Dec 12 00:54:14 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 1a7XVs-00052i-Ub for geb-bug-gnu-emacs@m.gmane.org; Sat, 12 Dec 2015 00:54:13 +0100 Original-Received: from localhost ([::1]:49955 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a7XVs-0006Ai-D4 for geb-bug-gnu-emacs@m.gmane.org; Fri, 11 Dec 2015 18:54:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40977) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a7XVn-00067S-EC for bug-gnu-emacs@gnu.org; Fri, 11 Dec 2015 18:54:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a7XVi-00073h-EA for bug-gnu-emacs@gnu.org; Fri, 11 Dec 2015 18:54:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:34924) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a7XVi-00073d-BX for bug-gnu-emacs@gnu.org; Fri, 11 Dec 2015 18:54:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1a7XVi-0000jr-70 for bug-gnu-emacs@gnu.org; Fri, 11 Dec 2015 18:54: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: Fri, 11 Dec 2015 23:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 22147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.14498779972786 (code B ref -1); Fri, 11 Dec 2015 23:54:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 11 Dec 2015 23:53:17 +0000 Original-Received: from localhost ([127.0.0.1]:35193 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1a7XUz-0000ir-KM for submit@debbugs.gnu.org; Fri, 11 Dec 2015 18:53:17 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:59055) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1a7XUx-0000if-PU for submit@debbugs.gnu.org; Fri, 11 Dec 2015 18:53:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a7XUr-0006yA-PR for submit@debbugs.gnu.org; Fri, 11 Dec 2015 18:53:10 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:56251) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a7XUr-0006y4-M5 for submit@debbugs.gnu.org; Fri, 11 Dec 2015 18:53:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40824) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a7XUq-0005Wz-My for bug-gnu-emacs@gnu.org; Fri, 11 Dec 2015 18:53:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a7XUl-0006xf-My for bug-gnu-emacs@gnu.org; Fri, 11 Dec 2015 18:53:08 -0500 Original-Received: from sub3.mail.dreamhost.com ([69.163.253.7]:39536 helo=homiemail-a21.g.dreamhost.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a7XUl-0006xb-Hr for bug-gnu-emacs@gnu.org; Fri, 11 Dec 2015 18:53:03 -0500 Original-Received: from homiemail-a21.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a21.g.dreamhost.com (Postfix) with ESMTP id 76FD5300072 for ; Fri, 11 Dec 2015 15:53:01 -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-a21.g.dreamhost.com (Postfix) with ESMTPA id BF1D530006C for ; Fri, 11 Dec 2015 15:53:00 -0800 (PST) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (x86_64-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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:109876 Archived-At: After commit e5ece322 that removed a layer of indirection for lax-whitesp= ace it's not possible anymore to override search-forward-lax-whitespace with own implementation to ignore all possible whitespace instead of just spaces in the search string. For example, such customization as this one: (setq search-whitespace-regexp "\\(\\s-\\|\n\\)+") (defun search-whitespace-regexp (string) "Return a regexp which ignores all possible whitespace in search string= . Uses the value of the variable `search-whitespace-regexp'." (if (or (not (stringp search-whitespace-regexp)) (null (if isearch-regexp isearch-regexp-lax-whitespace isearch-lax-whitespace))) string (replace-regexp-in-string search-whitespace-regexp search-whitespace-regexp string nil t))) (defun search-forward-lax-whitespace (string &optional bound noerror coun= t) (re-search-forward (search-whitespace-regexp (regexp-quote string)) bou= nd noerror count)) (defun search-backward-lax-whitespace (string &optional bound noerror cou= nt) (re-search-backward (search-whitespace-regexp (regexp-quote string)) bo= und noerror count)) (defun re-search-forward-lax-whitespace (regexp &optional bound noerror c= ount) (re-search-forward (search-whitespace-regexp regexp) bound noerror coun= t)) (defun re-search-backward-lax-whitespace (regexp &optional bound noerror = count) (re-search-backward (search-whitespace-regexp regexp) bound noerror cou= nt)) allowed to search for a string with a newline like =E2=80=98C-s abc C-q C= -j def=E2=80=99 and match the text =E2=80=9Cabc def=E2=80=9D. It's not clear what to do with this customization now using a replacement recommended in (make-obsolete old "instead, use (let ((search-spaces-regexp search-whitespace-regexp)) (re-search-... ...))"