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: query-replace-interactive not documented Date: Sat, 12 Jun 2004 11:21:35 +0300 Organization: JURTA Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <871xklw5io.fsf@mail.jurta.org> References: <20040528.181649.25475113.wl@gnu.org> <200405291737.i4THbPJ06689@raven.dms.auburn.edu> <873c5jug73.fsf@mail.jurta.org> <87oenqa4lu.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 1087028645 30419 80.91.224.253 (12 Jun 2004 08:24:05 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 12 Jun 2004 08:24:05 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sat Jun 12 10:23:59 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 1BZ3nz-0002wi-00 for ; Sat, 12 Jun 2004 10:23:59 +0200 Original-Received: from lists.gnu.org ([199.232.76.165]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BZ3nz-0003k9-00 for ; Sat, 12 Jun 2004 10:23:59 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BZ3ol-0002Pj-UI for emacs-devel@quimby.gnus.org; Sat, 12 Jun 2004 04:24:48 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BZ3ob-0002NS-BV for emacs-devel@gnu.org; Sat, 12 Jun 2004 04:24:37 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BZ3oZ-0002Mk-4i for emacs-devel@gnu.org; Sat, 12 Jun 2004 04:24:36 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BZ3oY-0002ML-Vp for emacs-devel@gnu.org; Sat, 12 Jun 2004 04:24:35 -0400 Original-Received: from [66.33.219.4] (helo=spork.dreamhost.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BZ3nR-0005OV-Db; Sat, 12 Jun 2004 04:23:25 -0400 Original-Received: from mail.jurta.org (80-235-39-208-dsl.mus.estpak.ee [80.235.39.208]) by spork.dreamhost.com (Postfix) with ESMTP id 9C52F11DC0D; Sat, 12 Jun 2004 01:23:22 -0700 (PDT) Original-To: David Kastrup In-Reply-To: (David Kastrup's message of "11 Jun 2004 11:00:32 +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.4 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:24863 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:24863 David Kastrup writes: > Juri Linkov writes: >> How about typing a special key (say, `M-e', where "e" stands for >> "eval" or "expression") in the second prompt for a replacement string >> to switch it to expression reading mode, and after typing RET >> to call `query-replace-regexp-eval' instead of `query-replace-regexp'. >> Actually, this means typing: >> >> C-M-% from-string RET M-e to-expr RET > > This has the advantage that if one starts out with a replacement, and > then figures that the replacement string needs to be as complicated > as to have to be specified in Lisp, one does not need to abandon the > already started replacement. > > Actually, I find myself doing this sort of starting over from M-% not > too rarely. So perhaps we should apply this > switch-type-of-replacement keybinding idea also to query-replace. The most natural keybinding for this would be M-r (like in isearch mode), but unfortunately it can't be used because this key is already bound in the minibuffer to the command that finds the previous history element. -- Juri Linkov http://www.jurta.org/emacs/