[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: should query-replace-regexp-eval be in the manual?
From: |
Robert J. Chassell |
Subject: |
Re: should query-replace-regexp-eval be in the manual? |
Date: |
Mon, 16 Apr 2007 00:51:09 +0000 (UTC) |
The discussion of query-replace-regexp presumes using it
interactively. That does not necessarily follow, although I suppose
interactive use is most common.
For example
M-C-% or.*ry RET \,(format "strange %s" \#)
is
(query-replace-regexp "or.*ry"
'(replace-eval-replacement
replace-quote
(format "strange %s" replace-count)))
[i.e., convert "ordinary" or something like it to "strange" plus a number]
When you are writing Emacs Lisp expressions, it is simpler to use
`query-replace-regexp-eval'. The same result will come from invoking
(query-replace-regexp-eval "or.*ary"
'(format "strange %s" replace-count))
I recommend leaving it in the source. Perhaps (a short) mention in
the manual is useful, although I do not feel strongly about that.
--
Robert J. Chassell GnuPG Key ID: 004B4AC8
address@hidden address@hidden
http://www.rattlesnake.com http://www.teak.cc
- should query-replace-regexp-eval be in the manual?, Drew Adams, 2007/04/13
- Re: should query-replace-regexp-eval be in the manual?, Alan Mackenzie, 2007/04/14
- RE: should query-replace-regexp-eval be in the manual?, Drew Adams, 2007/04/14
- Re: should query-replace-regexp-eval be in the manual?, David Kastrup, 2007/04/15
- Re: should query-replace-regexp-eval be in the manual?, David Kastrup, 2007/04/15
- Re: should query-replace-regexp-eval be in the manual?, Lennart Borgman (gmail), 2007/04/15
- RE: should query-replace-regexp-eval be in the manual?, Drew Adams, 2007/04/15
- Re: should query-replace-regexp-eval be in the manual?,
Robert J. Chassell <=
- Re: should query-replace-regexp-eval be in the manual?, Stefan Monnier, 2007/04/15
- RE: should query-replace-regexp-eval be in the manual?, Drew Adams, 2007/04/15
- Re: should query-replace-regexp-eval be in the manual?, Richard Stallman, 2007/04/16
- Re: should query-replace-regexp-eval be in the manual?, David Kastrup, 2007/04/16
- Re: should query-replace-regexp-eval be in the manual?, Richard Stallman, 2007/04/17
- Re: should query-replace-regexp-eval be in the manual?, David Kastrup, 2007/04/17
- Re: should query-replace-regexp-eval be in the manual?, Richard Stallman, 2007/04/18
- Re: should query-replace-regexp-eval be in the manual?, David Kastrup, 2007/04/18