From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: query-replace-interactive not documented Date: 16 Jun 2004 01:13:03 +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> <878yeoadpd.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 1087341251 5886 80.91.224.253 (15 Jun 2004 23:14:11 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 15 Jun 2004 23:14:11 +0000 (UTC) Cc: Juri Linkov , Andreas Schwab , rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Wed Jun 16 01:13:56 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 1BaN7s-00071Z-00 for ; Wed, 16 Jun 2004 01:13:56 +0200 Original-Received: from lists.gnu.org ([199.232.76.165]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BaN7s-0000Qm-00 for ; Wed, 16 Jun 2004 01:13:56 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BaN8p-0006pl-Q8 for emacs-devel@quimby.gnus.org; Tue, 15 Jun 2004 19:14:55 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BaN8e-0006o0-D4 for emacs-devel@gnu.org; Tue, 15 Jun 2004 19:14:44 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BaN8c-0006mM-1m for emacs-devel@gnu.org; Tue, 15 Jun 2004 19:14:42 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BaN8b-0006lZ-PR for emacs-devel@gnu.org; Tue, 15 Jun 2004 19:14:41 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BaN79-0004vr-T1 for emacs-devel@gnu.org; Tue, 15 Jun 2004 19:13:11 -0400 Original-Received: from localhost ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.34) id 1BaN72-00009b-SP; Tue, 15 Jun 2004 19:13:05 -0400 Original-To: storm@cua.dk (Kim F. Storm) In-Reply-To: Original-Lines: 59 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:25014 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:25014 storm@cua.dk (Kim F. Storm) writes: > David Kastrup writes: > > > Andreas Schwab writes: > > > > > Juri Linkov writes: > > > > > > > Index: replace.el > > > > =================================================================== > > > > RCS file: /cvsroot/emacs/emacs/lisp/replace.el,v > > > > retrieving revision 1.172 > > > > diff -c -r1.172 replace.el > > > > *** replace.el 10 Jun 2004 04:21:14 -0000 1.172 > > > > --- replace.el 15 Jun 2004 17:57:28 -0000 > > > > *************** > > > > *** 174,179 **** > > > > --- 183,199 ---- > > > > (if (and transient-mark-mode mark-active) > > > > (region-end))))) > > > > > > > > + (if (string-match "\\\\'" to-string) > > > > + (let (to expr) > > > > + (while (string-match "\\\\'" to-string) > > > > > > That needs more careful treatment, to handle cases like "\\\\'" where one > > > wants to substitute a backslash followed by a single quote. > > > > I am going to take a stab at this. > > > I don't like the \'(...) form -- to me ' means "DONT INTERPRET" Well, it _is_ a delayed interpretation after all. Another option may be \`read-expression optionally followed by ' which gives us \\footnote{\\label{fn:\`replace-count'}} as well as \\footnote{\\label{fn:\`(or replace-count)}} \` has somewhat more of a "will be evaluated later" scent and it has the advantage that it is somewhat natural to match it up with ' in case we need to explicitly end the read expression. > Maybe \=(...) is better ? = is really comparison in my book instead of evaluation... > Also, \? could be used to ask the user for a string to insert at > that point in each replacement... One after the other. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum