From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Chong Yidong" Newsgroups: gmane.emacs.devel Subject: Re: search-whitespace-regexp Date: Sun, 6 Feb 2005 20:36:39 -0500 (EST) Message-ID: <46742.203.116.59.23.1107740199.squirrel@203.116.59.23> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1107740495 5458 80.91.229.2 (7 Feb 2005 01:41:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 7 Feb 2005 01:41:35 +0000 (UTC) Cc: emacs-devel@gnu.org, rms@gnu.org, Drew Adams , miles@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 07 02:41:34 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Cxxu0-0003iM-2w for ged-emacs-devel@m.gmane.org; Mon, 07 Feb 2005 02:41:24 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Cxy81-0006qH-Ug for ged-emacs-devel@m.gmane.org; Sun, 06 Feb 2005 20:55:54 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Cxy7R-0006lQ-Aq for emacs-devel@gnu.org; Sun, 06 Feb 2005 20:55:18 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Cxy7G-0006g8-Ek for emacs-devel@gnu.org; Sun, 06 Feb 2005 20:55:08 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Cxy7F-0006d0-Ut for emacs-devel@gnu.org; Sun, 06 Feb 2005 20:55:06 -0500 Original-Received: from [64.21.80.18] (helo=shark.dnsvelocity.com) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1Cxxpg-0002Ve-Ho; Sun, 06 Feb 2005 20:36:56 -0500 Original-Received: from stupidch by shark.dnsvelocity.com with local (Exim 4.43) id 1CxxpP-000208-Li; Sun, 06 Feb 2005 20:36:39 -0500 Original-Received: from 203.116.59.23 ([203.116.59.23]) (SquirrelMail authenticated user cyd@stupidchicken.com); by stupidchicken.com with HTTP; Sun, 6 Feb 2005 20:36:39 -0500 (EST) In-Reply-To: Original-To: snogglethorpe@gmail.com User-Agent: SquirrelMail/1.4.3a X-Mailer: SquirrelMail/1.4.3a X-Priority: 3 (Normal) Importance: Normal X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - shark.dnsvelocity.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [32675 33085] / [47 12] X-AntiAbuse: Sender Address Domain - shark.dnsvelocity.com X-Source: /usr/local/cpanel/3rdparty/bin/php X-Source-Args: /usr/local/cpanel/3rdparty/bin/php /usr/local/cpanel/base/3rdparty/squirrelmail/src/compose.php X-Source-Dir: stupidchicken.com:/base/3rdparty/squirrelmail/src X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org X-MailScanner-To: ged-emacs-devel@m.gmane.org Xref: main.gmane.org gmane.emacs.devel:32979 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:32979 Let me try to explain my idea more clearly. Since RMS has raised the issue of incompatibility, I think the default behavior for isearch should be left as it was in 21.3, for the moment. In other words, regexp search has a magic space, and string search doesn't. However, there should be a way for the user to customize this. It is relatively easy for a user to get rid of the magic space for regexp search, if he wants to: (setq search-whitespace-regexp nil) However, there is no easy way for a user to turn on the magic space for string search; you have to hack isearch.el to do it. I suggest implementing an analogous mechanism for string search (I'm not certain what the variable should be called, though): (defvar search-string-whitespace-regexp nil "If non-nil, regular expression to match a sequence of whitespace chars. This applies to ordinary incremental search. You might want to use something like "[ \t\r\n]+" instead.") Because the default is nil, there is no magic space, and the behavior is like 21.3 and below; but users or Lisp libraries can set it as needed. For example, longlines.el can set it to "[ \n]" so that linebreaks and spaces are treated equally.