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: Fri, 09 Jul 2004 23:54:14 +0300 Organization: JURTA Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <87u0wglx55.fsf@mail.jurta.org> References: <877jth4e9u.fsf@mail.jurta.org> <87zn6dqei0.fsf@mail.jurta.org> <87eknoifmv.fsf@mail.jurta.org> <87vfgz4qn3.fsf@mail.jurta.org> <87oemqs8f2.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 1089406687 11917 80.91.224.253 (9 Jul 2004 20:58:07 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 9 Jul 2004 20:58:07 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri Jul 09 22:57:58 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 1Bj2RS-0006Wy-00 for ; Fri, 09 Jul 2004 22:57:58 +0200 Original-Received: from lists.gnu.org ([199.232.76.165]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1Bj2RS-0000xD-00 for ; Fri, 09 Jul 2004 22:57:58 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Bj2Td-0006b1-D4 for emacs-devel@quimby.gnus.org; Fri, 09 Jul 2004 17:00:13 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1Bj2TU-0006aw-JO for emacs-devel@gnu.org; Fri, 09 Jul 2004 17:00:04 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1Bj2TS-0006ak-Fx for emacs-devel@gnu.org; Fri, 09 Jul 2004 17:00:04 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Bj2TS-0006ah-AE for emacs-devel@gnu.org; Fri, 09 Jul 2004 17:00:02 -0400 Original-Received: from [66.33.219.6] (helo=knife.dreamhost.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Bj2Qx-0005vE-02; Fri, 09 Jul 2004 16:57:27 -0400 Original-Received: from mail.jurta.org (80-235-39-197-dsl.mus.estpak.ee [80.235.39.197]) by knife.dreamhost.com (Postfix) with ESMTP id 7A075E58D4; Fri, 9 Jul 2004 13:57:21 -0700 (PDT) Original-To: David Kastrup In-Reply-To: (David Kastrup's message of "08 Jul 2004 20:12:14 +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:25562 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:25562 David Kastrup writes: > And how would you want to write this in the manual? > > "You can use either M-% or C-M-% in a regexp isearch to do a regexp > replacement, but only M-% will do a plain replacement in normal > isearch whereas C-M-% will switch to a regexp replacement, while the > current match will not [or maybe will?] get quotified so the match > does not stop for future replacements". > > That's a bunch of crock. It is not worth the price in obscurity, > just to save the user from pressing one additional key. But information about pressing that additional key to switch the search to regexp mode to start a regexp replacement should be documented in the manual too. Anyway, I looked at the problem from the user's point of view and allowing C-M-% to call a regexp replacement in normal isearch was based on the simple premise: it is natural for Emacs users to expect that typing C-M-% regardless of search type (regexp or normal) will start a regexp replacement with the from-string taken from the search string displayed in the isearch echo area. And it is the responsibility of the user to guarantee that the search string before typing C-M-% is literally the same as the user intended to use it for the from-string argument of a regexp replacement. If you agree with this, appropriately writing this in the manual might not look too ugly. If not, it's not a big problem not to bind C-M-% to a regexp replacement in normal isearch. -- Juri Linkov http://www.jurta.org/emacs/