From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: query-replace-interactive not documented Date: 17 Jun 2004 16:10:39 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <20040528.181649.25475113.wl@gnu.org> <200405291737.i4THbPJ06689@raven.dms.auburn.edu> <873c5jug73.fsf@mail.jurta.org> <87oenqa4lu.fsf@mail.jurta.org> <873c51w5rq.fsf@mail.jurta.org> <87659snbd8.fsf@mail.jurta.org> <87llin98sc.fsf@mail.jurta.org> <87n033y0yj.fsf@mail.jurta.org> , schwab@suse.de, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Thu Jun 17 16:10:48 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 1BaxbM-0000As-00 for ; Thu, 17 Jun 2004 16:10:48 +0200 Original-Received: from lists.gnu.org ([199.232.76.165]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BaxbM-0005Kj-00 for ; Thu, 17 Jun 2004 16:10:48 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BaxcP-0005OH-7y for emacs-devel@quimby.gnus.org; Thu, 17 Jun 2004 10:11:53 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BaxcF-0005Nd-7z for emacs-devel@gnu.org; Thu, 17 Jun 2004 10:11:44 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BaxcE-0005NA-AC for emacs-devel@gnu.org; Thu, 17 Jun 2004 10:11:42 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BaxcE-0005Mz-23 for emacs-devel@gnu.org; Thu, 17 Jun 2004 10:11:42 -0400 Original-Received: from [212.88.64.25] (helo=mail-relay.sonofon.dk) by monty-python.gnu.org with smtp (Exim 4.34) id 1Baxay-0002T3-QI for emacs-devel@gnu.org; Thu, 17 Jun 2004 10:10:25 -0400 Original-Received: (qmail 89673 invoked from network); 17 Jun 2004 14:10:22 -0000 Original-Received: from unknown (HELO kfs-l.imdomain.dk.cua.dk) (213.83.150.2) by 0 with SMTP; 17 Jun 2004 14:10:22 -0000 Original-To: David Kastrup In-Reply-To: Original-Lines: 40 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 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:25061 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:25061 David Kastrup writes: > storm@cua.dk (Kim F. Storm) writes: > > > David Kastrup writes: > > > > > > > > Ok, I just redid this. I have completely thrown out \\? again: if one > > > wanted to implement it, the right place would not be in preparing the > > > replacement list where \, is implemented, but rather during > > > perform-replace. > > > > Here's a wild idea: > > If you had bothered to read my mail to the end... Sorry, I stopped reading at "\\(\\`\\|[^\\]\\)\\(\\\\\\\\\\)*\\\\\\?" in the fourth line of the relevant paragraph: ,------ | And then it should be done _after_ the question | "replace woozle with heffalump\? (y/n)?" has been answered positively, | by using a while loop that removes the first proper \? in the string | (using the "\\(\\`\\|[^\\]\\)\\(\\\\\\\\\\)*\\\\\\?" pattern) | and calls the replacement string editor with the cursor at the specified | location, until there is no longer an unescaped \?. After that, the | replacement can be performed. `------ > What is wrong about my proposal to just keep further occurences of \? > in the string and repeat prompting for the remaining first one until > none of them remains? You can either edit out everything at once, if > you so desire, or just enter stuff at the current location, press > return, and get the next \? trigger operated on. Nothing wrong -- Your idea is excellent. -- Kim F. Storm http://www.cua.dk