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: isearch-query-replace-regexp and stuff Date: Wed, 07 Jul 2004 21:29:52 +0300 Organization: JURTA Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <87vfgz4qn3.fsf@mail.jurta.org> References: <877jth4e9u.fsf@mail.jurta.org> <87zn6dqei0.fsf@mail.jurta.org> <87eknoifmv.fsf@mail.jurta.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1089227489 19788 80.91.224.253 (7 Jul 2004 19:11:29 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 7 Jul 2004 19:11:29 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Wed Jul 07 21:11:16 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BiHp6-0006zW-00 for ; Wed, 07 Jul 2004 21:11:16 +0200 Original-Received: from lists.gnu.org ([199.232.76.165]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BiHp6-0007Rv-00 for ; Wed, 07 Jul 2004 21:11:16 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BiHrB-0003Ds-91 for emacs-devel@quimby.gnus.org; Wed, 07 Jul 2004 15:13:25 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BiHr7-0003Dm-VV for emacs-devel@gnu.org; Wed, 07 Jul 2004 15:13:22 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BiHr6-0003Da-Aq for emacs-devel@gnu.org; Wed, 07 Jul 2004 15:13:21 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BiHr6-0003DX-8Q for emacs-devel@gnu.org; Wed, 07 Jul 2004 15:13:20 -0400 Original-Received: from [66.33.205.9] (helo=spatula.dreamhost.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BiHoZ-0006kO-UJ; Wed, 07 Jul 2004 15:10:44 -0400 Original-Received: from mail.jurta.org (80-235-44-12-dsl.mus.estpak.ee [80.235.44.12]) by spatula.dreamhost.com (Postfix) with ESMTP id D80B117D1EB; Wed, 7 Jul 2004 12:10:37 -0700 (PDT) Original-To: David Kastrup In-Reply-To: (David Kastrup's message of "07 Jul 2004 11:29:37 +0200") 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: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:25532 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:25532 David Kastrup writes: > Juri Linkov writes: >> The current behavior of C-M-s to repeat the non-regexp search is not >> the most reasonable one. More correct would be to switch the search >> to regexp mode before doing the search again. I guess it works now >> that way because it was simpler to implement and nobody cared about >> handling this case specially. But we could change the behavior of >> C-M-s in non-regexp mode to switch to regexp mode for consistency >> with C-M-%. > > But that's inconsistent with being able to use both C-s and M-C-s in > regexp searches. > > Don't you see that? You can see the following comments for `isearch-mode-map' in isearch.el (underlining is mine): ;; Define M-C-s and M-C-r like C-s and C-r so that the same key ;; combinations can be used to repeat regexp isearches that can ================ ;; be used to start these searches. So the meaning of C-M-s in a non-regexp search is still undefined, and the fact that C-M-s can repeat a non-regexp search is a side effect of the current implementation. And there is no symmetry between normal and regexp searches and it doesn't need to be. The regexp search C-M-s is regarded everywhere in Emacs as a specific type of more general C-s search per se. So there is no need to keep symmetry for C-M-s in a normal search with C-M-s in a regexp search. And moreover, more appropriate action for C-M-s in a normal search is to switch the search to regexp mode because the Meta key in C-M-s has an strong association with a specific regexp search type. -- Juri Linkov http://www.jurta.org/emacs/