[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: query-replace-interactive not documented

From: David Kastrup
Subject: Re: query-replace-interactive not documented
Date: 14 Jun 2004 23:20:44 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

address@hidden (Kim F. Storm) writes:

> Richard Stallman <address@hidden> 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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]