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: David Kastrup
Subject: Re: query-replace-interactive not documented
Date: 11 Jun 2004 11:00:32 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

Juri Linkov <address@hidden> writes:

> Juri Linkov <address@hidden> writes:
> > What should be documented in the Emacs manual is a very useful
> > command `query-replace-regexp-eval'.  It even deserves its own
> > keybinding.  But if there are no spare keybindings for it, then
> > perhaps it could be invoked by a prefix arg of
> > `query-replace-regexp' like e.g. C-u C-M-% ?
> 
> I don't want to abandon the attempt to make this useful command more
> accessible.
> 
> How about typing a special key (say, `M-e', where "e" stands for
> "eval" or "expression") in the second prompt for a replacement string
> to switch it to expression reading mode, and after typing RET
> to call `query-replace-regexp-eval' instead of `query-replace-regexp'.
> Actually, this means typing:
> 
> C-M-% from-string RET M-e to-expr RET

This has the advantage that if one starts out with a replacement, and
then figures that the replacement string needs to be as complicated
as to have to be specified in Lisp, one does not need to abandon the
already started replacement.

Actually, I find myself doing this sort of starting over from M-% not
too rarely.  So perhaps we should apply this
switch-type-of-replacement keybinding idea also to query-replace.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

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