emacs-devel
[Top][All Lists]
Advanced

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

Re: query-replace-interactive not documented


From: Kim F. Storm
Subject: Re: query-replace-interactive not documented
Date: 16 Jun 2004 13:30:40 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

David Kastrup <address@hidden> writes:

> Juri Linkov <address@hidden> writes:
> 
> > address@hidden (Kim F. Storm) writes:
> > > Andreas Schwab <address@hidden> writes:
> > >> Juri Linkov <address@hidden> writes:
> > >> > To use a single variable inside a replacement string, one can use
> > >> > a no-op function like `+':
> > >> 
> > >> Or even progn.
> > >
> > > Or or, which is even shorter...
> > 
> > Which is shorter only for non-numeric variables.
> > But for numeric variables + is the shortest one.
> > 
> > But there is still one too long name that the user should type:
> > `replace-count'.  WIBN to have aliases for this name?
> > At least, `c' and `i' would make sense.
> > 
> > So, instead of:
> > 
> > C-M-% \\footnote{ RET \&\\label{fn:\,(+ replace-count)} RET
> > 
> > to type:
> > 
> > C-M-% \\footnote{ RET \&\\label{fn:\,(+ c)} RET
> 
> I'd rather say that since we already have special symbols
> \1 \2 \3 \#1 \#2 \#3, that the most natural choice would probably be
> just \# for the match number.  Then we'd have
> 
> \\label{fn:\,\# } RET
> 
> And it would probably make sense to define \# as a string component
> on its own, too, so that we can just write
> \\label{fn:\#} RET
> if we want to.
> 

\, and \# both looks good to me.  

The extra space after the \, form should be optional, i.e. if there is
a space, remove it, if not, it's not an error.

I haven't studied the two proposed implementations in details,
but if there is an issue re. security and non-interactive calls,
it might make sense to simply not accept these formats if called
non-interactively.  After all, this function is called
QUERY-replace-regexp.


-- 
Kim F. Storm <address@hidden> http://www.cua.dk





reply via email to

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