From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: spaces in isearch Date: Sun, 21 Nov 2004 19:09:48 +0200 Organization: JURTA Message-ID: <87u0rjjfh1.fsf@jurta.org> References: <87r7mnvs5c.fsf@jurta.org> <871xen4fzi.fsf@confusibombus.emacswiki.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1101057331 29933 80.91.229.6 (21 Nov 2004 17:15:31 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 21 Nov 2004 17:15:31 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 21 18:15:13 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CVvIu-0000Jp-00 for ; Sun, 21 Nov 2004 18:15:13 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CVvRv-0003VM-GJ for ged-emacs-devel@m.gmane.org; Sun, 21 Nov 2004 12:24:31 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CVvRl-0003Tt-DJ for emacs-devel@gnu.org; Sun, 21 Nov 2004 12:24:21 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CVvRk-0003Sy-BN for emacs-devel@gnu.org; Sun, 21 Nov 2004 12:24:20 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CVvRk-0003Sr-8j for emacs-devel@gnu.org; Sun, 21 Nov 2004 12:24:20 -0500 Original-Received: from [205.196.208.4] (helo=whisk.dreamhost.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CVvIC-0000jz-Hi; Sun, 21 Nov 2004 12:14:28 -0500 Original-Received: from mail.jurta.org (80-235-41-55-dsl.mus.estpak.ee [80.235.41.55]) by whisk.dreamhost.com (Postfix) with ESMTP id 7F04617511F; Sun, 21 Nov 2004 09:14:25 -0800 (PST) Original-To: Alex Schroeder In-Reply-To: <871xen4fzi.fsf@confusibombus.emacswiki.org> (Alex Schroeder's message of "Sun, 21 Nov 2004 12:08:01 +0100") User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux) 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 Xref: main.gmane.org gmane.emacs.devel:30192 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:30192 Alex Schroeder writes: > Juri Linkov writes: >> Since C-q in isearch mode is processed by isearch-quote-char, >> it could intercept SPC and insert [ ] into the search string. > > I'm not sure I like that. C-q should insert , No, C-q should be used to insert . There is no sense to use C-q to insert the same . > I didn't know about the special behaviour of in > isearch-forward-regexp. The old behavior: SPC inserts \\(?:\\s-+\\), C-q SPC inserts SPC. The new behavior: SPC inserts SPC (which now internally means \\(?:\\s-+\\)). So C-q SPC inserting SPC has no sense anymore since SPC now is inserted by SPC itself. Moreover, to achieve backward compatibility for users using C-q SPC to match just a space, C-q SPC should do something to preserve the literal meaning of a space. Adding [ ] to the search string in regexp isearch mode is the most natural thing to do. >>From implementation point of view this means moving the old code from `isearch-whitespace-chars' to `isearch-quote-char' and replacing (isearch-process-search-string search-whitespace-regexp " ") with (isearch-process-search-string "[ ]" " ") -- Juri Linkov http://www.jurta.org/emacs/