From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: query-replace-regexp-eval is quite nice, but... Date: 02 Feb 2004 16:03:27 +0100 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <200402021216.i12CGdKb015329@beta.mvs.co.il> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1075740437 10895 80.91.224.253 (2 Feb 2004 16:47:17 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 2 Feb 2004 16:47:17 +0000 (UTC) Cc: Ehud Karni , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon Feb 02 17:47:12 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AnhE8-0004Zi-00 for ; Mon, 02 Feb 2004 17:47:12 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1AnhE7-0003qp-00 for ; Mon, 02 Feb 2004 17:47:11 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1Angei-0001Pc-FI for emacs-devel@quimby.gnus.org; Mon, 02 Feb 2004 11:10:36 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AngeG-0001Oj-77 for emacs-devel@gnu.org; Mon, 02 Feb 2004 11:10:08 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AngYI-0000F9-C2 for emacs-devel@gnu.org; Mon, 02 Feb 2004 11:04:29 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1Ang4n-0002nL-Gx for emacs-devel@gnu.org; Mon, 02 Feb 2004 10:33:29 -0500 Original-Received: from fencepost.gnu.org ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.24) id 1Ang3V-0007Uc-Jx; Mon, 02 Feb 2004 10:32:10 -0500 Original-To: Andreas Schwab In-Reply-To: Original-Lines: 21 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:19662 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:19662 Andreas Schwab writes: > "Ehud Karni" writes: > > > How about checking regexp-flag (which is bound by `perform-replace') ? > > > > Assuming your "literal" result string (containing \n) is STR you can > > add something like this to your lisp: > > > > (if regexp-flag > > (regexp-quote STR) > > STR) > > regexp-flag is always non-nil when called from query-replace-regexp-eval, > and regexp-quote quotes too much for replace-match. Not to mention that "e" (edit the replacement string) would be really annoying. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum