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: 14 Jun 2004 23:20:44 +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> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1087248090 12016 80.91.224.253 (14 Jun 2004 21:21:30 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 14 Jun 2004 21:21:30 +0000 (UTC) Cc: juri@jurta.org, rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon Jun 14 23:21:18 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 1BZytK-0004Ra-00 for ; Mon, 14 Jun 2004 23:21:18 +0200 Original-Received: from lists.gnu.org ([199.232.76.165]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BZytK-0003ZN-00 for ; Mon, 14 Jun 2004 23:21:18 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BZyuE-0001P7-Jh for emacs-devel@quimby.gnus.org; Mon, 14 Jun 2004 17:22:14 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BZyuB-0001Oo-0z for emacs-devel@gnu.org; Mon, 14 Jun 2004 17:22:11 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BZyuA-0001OU-9R for emacs-devel@gnu.org; Mon, 14 Jun 2004 17:22:10 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BZyuA-0001Ng-4A for emacs-devel@gnu.org; Mon, 14 Jun 2004 17:22:10 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BZysy-0002Az-TE for emacs-devel@gnu.org; Mon, 14 Jun 2004 17:20:57 -0400 Original-Received: from localhost ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.34) id 1BZyso-0006cm-2Y; Mon, 14 Jun 2004 17:20:46 -0400 Original-To: storm@cua.dk (Kim F. Storm) In-Reply-To: Original-Lines: 36 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:24969 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:24969 storm@cua.dk (Kim F. Storm) writes: > Richard Stallman writes: > > > Of course, most of these uses could be avoided if the replacement > > string of the ordinary query-replace-regexp would offer, say > > > > M-x query-replace-regexp RET > > \\footnote{ RET > > \\footnote{\\label{fn:\!replace-count} RET > > > > or > > > > \\footnote{\\label{fn:\!(format "%d" replace-count)} RET > > > > Namely \! followed by a sexp. > > > > That seems like an interesting idea. > > I would prefer a syntax which can be parsed with `read', which > includes the second example above, but not the first one. Well, this was of course just a wild proposal without any serious thought behind the involved details. One should probably take a look at eshell syntax maybe for getting some suggestions for a somewhat consistent syntax, and one would need to think about a way that makes it possible to end the expression in question without adding unnecessary spaces or so to the match. And of course, this sort of stuff should not be done by replace-match or similar functions but just by the interactive function, to avoid opening security concerns when Emacs is used as a match-and-replace engine (where people don't expect it to execute arbitrary code). -- David Kastrup, Kriemhildstr. 15, 44793 Bochum