[Top][All Lists]

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

RE: general perform-replace REPLACEMENTS arg for regexpquery-replacement

From: Drew Adams
Subject: RE: general perform-replace REPLACEMENTS arg for regexpquery-replacement?
Date: Mon, 17 Nov 2008 17:01:09 -0800

> > Actually, after sending the mail and realizing that the 
> > sequence would always be not just \@ but \@(, I thought
> > (and think) that perhaps simply \( would be
> > better. This is about passing a list. So I'd propose that.
> >
> >  C-M-% RET abc RET \("<xyz>" "</xyz>")
> >
> > WDOT?
> Then we can perfectly use just the current syntax `\,' 
> without inventing a new one, e.g.
>   C-M-% RET abc RET \,'("<xyz>" "</xyz>")

Have you tried it? That was the first thing I tried.

The problem is that \, converts the sexp that follows it to a string.
> The only place currently preventing this is prin1-to-string that turns
> a list into a string.  We could change it to keep the list intact.

Yes, but then you lose the ability to get the current behavior: replace by the
string, "(\"zzz\" \"aaa\")".

IMO, two different syntaxes are needed to separate the two different user
intentions: a sexp that evals to a string "(...)" and a sexp that evals to a
list of strings to pass to `perform-replace'.

For the second case, I think, as I said, that there is no need to provide for a
sexp that evals to the list; it is enough to provide for a literal list. IMO.

reply via email to

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