From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: should query-replace-regexp-eval be in the manual? Date: Sun, 15 Apr 2007 23:56:03 +0200 Message-ID: <85ejmlwbd8.fsf@lola.goethe.zz> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1176674179 29004 80.91.229.12 (15 Apr 2007 21:56:19 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 15 Apr 2007 21:56:19 +0000 (UTC) Cc: Emacs-Devel To: "Drew Adams" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Apr 15 23:56:13 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HdChh-0004yE-7q for ged-emacs-devel@m.gmane.org; Sun, 15 Apr 2007 23:56:13 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HdCmE-0007t0-FL for ged-emacs-devel@m.gmane.org; Sun, 15 Apr 2007 18:00:54 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HdCmB-0007ry-8u for emacs-devel@gnu.org; Sun, 15 Apr 2007 18:00:51 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HdCm7-0007rm-Ot for emacs-devel@gnu.org; Sun, 15 Apr 2007 18:00:50 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HdCm7-0007rj-JP for emacs-devel@gnu.org; Sun, 15 Apr 2007 18:00:47 -0400 Original-Received: from mail-in-08.arcor-online.net ([151.189.21.48]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1HdChZ-0006zw-KI for emacs-devel@gnu.org; Sun, 15 Apr 2007 17:56:05 -0400 Original-Received: from mail-in-08-z2.arcor-online.net (mail-in-08-z2.arcor-online.net [151.189.8.20]) by mail-in-08.arcor-online.net (Postfix) with ESMTP id 0FEF527B3B0; Sun, 15 Apr 2007 23:56:04 +0200 (CEST) Original-Received: from mail-in-07.arcor-online.net (mail-in-07.arcor-online.net [151.189.21.47]) by mail-in-08-z2.arcor-online.net (Postfix) with ESMTP id 0224F213102; Sun, 15 Apr 2007 23:56:04 +0200 (CEST) Original-Received: from lola.goethe.zz (dslb-084-061-027-249.pools.arcor-ip.net [84.61.27.249]) by mail-in-07.arcor-online.net (Postfix) with ESMTP id CD1DB2C29E3; Sun, 15 Apr 2007 23:56:03 +0200 (CEST) Original-Received: by lola.goethe.zz (Postfix, from userid 1002) id 3ADAD1C2BC02; Sun, 15 Apr 2007 23:56:03 +0200 (CEST) In-Reply-To: (Drew Adams's message of "Sat\, 14 Apr 2007 07\:43\:23 -0700") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.96 (gnu/linux) X-detected-kernel: Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:69472 Archived-At: "Drew Adams" writes: >> Drew, do you actually use this command? If so, how? > > I haven't used it yet - except a few times to try it out, after stumbling > upon it in the source code. It worked fine. > > For those who are familiar with this command and with using `\,' with > `query-replace-regexp': Could you compare/contrast these two in terms of use > cases? query-replace-regexp-eval can do nothing that one can't achieve with a use of a \, expression in query-replace-regexp. In contrast to query-replace-regexp-eval, \, does not necessitate deciding in advance that you are going to need Lisp for a job, and you'll only need to use Lisp for those parts of the expression where it is necessary. I came up with the idea of \, after stumbling upon query-replace-regexp-eval and noticing that the typical usage pattern was to start something with C-M-%, type stuff into it, then do a combination of C-k, C-g, C-M-Esc or other things I don't remember right now, in order to restart the whole process using query-replace-regexp-eval instead. And query-replace-regexp-eval does not have a keybinding of its own. Basically it has been my experience that query-replace-regexp-eval is a nice idea, but in practice quite unusable. \, achieves a similar purpose but with a much more convenient interface. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum