From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: search-whitespace-regexp Date: Sun, 6 Feb 2005 16:28:33 -0800 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1107736836 30432 80.91.229.2 (7 Feb 2005 00:40:36 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 7 Feb 2005 00:40:36 +0000 (UTC) Cc: Chong Yidong , rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 07 01:40:35 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1CxwwX-0007BY-Nl for ged-emacs-devel@m.gmane.org; Mon, 07 Feb 2005 01:39:58 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CxxAZ-0003rs-8l for ged-emacs-devel@m.gmane.org; Sun, 06 Feb 2005 19:54:27 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Cxx9J-0003Kl-1u for emacs-devel@gnu.org; Sun, 06 Feb 2005 19:53:09 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Cxx99-0003GC-8N for emacs-devel@gnu.org; Sun, 06 Feb 2005 19:53:06 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Cxx97-0003CH-QQ for emacs-devel@gnu.org; Sun, 06 Feb 2005 19:52:57 -0500 Original-Received: from [148.87.122.32] (helo=rgminet03.oracle.com) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CxwmJ-00073r-IC; Sun, 06 Feb 2005 19:29:23 -0500 Original-Received: from rgminet03.oracle.com (localhost [127.0.0.1]) by rgminet03.oracle.com (Switch-3.1.6/Switch-3.1.6) with ESMTP id j170TJSK001772; Sun, 6 Feb 2005 19:29:19 -0500 Original-Received: from rgmsgw301.us.oracle.com (rgmsgw301.us.oracle.com [138.1.191.50]) by rgminet03.oracle.com (Switch-3.1.6/Switch-3.1.6) with ESMTP id j170SaR3001296; Sun, 6 Feb 2005 19:28:40 -0500 Original-Received: from rgmsgw301.us.oracle.com (localhost [127.0.0.1]) by rgmsgw301.us.oracle.com (Switch-3.1.4/Switch-3.1.0) with ESMTP id j170SZNA022241; Sun, 6 Feb 2005 17:28:35 -0700 Original-Received: from dradamslap (dhcp-amer-csvpn-gw2-141-144-72-72.vpn.oracle.com [141.144.72.72]) by rgmsgw301.us.oracle.com (Switch-3.1.4/Switch-3.1.0) with SMTP id j170SXr6022232 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Sun, 6 Feb 2005 17:28:34 -0700 Original-To: , , "Stefan Monnier" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-Reply-To: Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 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:32977 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:32977 > > sometimes the actual whitespace matters. > Right: in *regexp* search. while people generally expect regexp searches to be a bit fuzzy, they might expect a non-regexp search to be exact. Since the fuzzy whitespace matching often "looks" like normal matching (because the majority of whitespace is in fact a single space), it might take some time to see what's going on, resulting in some subtle errors. This is particularly true if one embeds a search inside a keyboard macro [which I often do]. Plain (incremental) search should be a literal search. Regexp search should rigorously respect the regexp. People don't expect either to be fuzzy. The question is "Under what circumstances should typing a space be interpreted as wanting to search for any amount of whitespace?" This is unrelated to both plain search and regexp search. You might or might not want this _input effect_ with either plain or regexp search. This is akin to word search (as I think someone mentioned). Ultimately, a word search or a space-means-whitespace search is implemented with a regexp search - but the point in both cases is to provide a user-friendly way to do it, instead of requiring users to know about regexps. By default, neither `C-M-s' nor `C-s' should respect the user-friendly space-input feature. Or, rather, the default behavior of each should be determined by a user option - a la case-fold-search. And, regardless of the value of this option, you should be able to toggle space-means-whitespace searching from both `C-M-s' and `C-s', via a key sequence. The question then becomes how to toggle this space-means-whitespace searching? An obvious candidate is `C-s C-SPC'. (Some will no doubt argue against this because it means you can't just end a search and set the mark this way.)