From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: general perform-replace REPLACEMENTS arg for regexpquery-replacement? Date: Mon, 17 Nov 2008 17:01:09 -0800 Message-ID: <000101c94919$250e6440$0ab32382@us.oracle.com> References: <005901c94752$06ca6e70$0200a8c0@us.oracle.com><005b01c94771$e8129be0$0200a8c0@us.oracle.com><877i73p9ia.fsf@jurta.org><001a01c94853$5a0ee1e0$0200a8c0@us.oracle.com> <873ahq3r0k.fsf@jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1226970127 12044 80.91.229.12 (18 Nov 2008 01:02:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 18 Nov 2008 01:02:07 +0000 (UTC) Cc: emacs-devel@gnu.org To: "'Juri Linkov'" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 18 02:03:07 2008 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 1L2Ezi-00029v-D7 for ged-emacs-devel@m.gmane.org; Tue, 18 Nov 2008 02:03:06 +0100 Original-Received: from localhost ([127.0.0.1]:60876 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L2Eya-0005Lr-0n for ged-emacs-devel@m.gmane.org; Mon, 17 Nov 2008 20:01:56 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L2Exz-0005AG-2o for emacs-devel@gnu.org; Mon, 17 Nov 2008 20:01:19 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L2Exw-00059G-F9 for emacs-devel@gnu.org; Mon, 17 Nov 2008 20:01:18 -0500 Original-Received: from [199.232.76.173] (port=33439 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L2Exw-00059B-9z for emacs-devel@gnu.org; Mon, 17 Nov 2008 20:01:16 -0500 Original-Received: from rcsinet12.oracle.com ([148.87.113.124]:22946 helo=rgminet12.oracle.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L2Exv-00023e-U9 for emacs-devel@gnu.org; Mon, 17 Nov 2008 20:01:16 -0500 Original-Received: from acsinet13.oracle.com (acsinet13.oracle.com [141.146.126.235]) by rgminet12.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id mAI114Cq001466 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 18 Nov 2008 01:01:07 GMT Original-Received: from acsmt704.oracle.com (acsmt704.oracle.com [141.146.40.82]) by acsinet13.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id mAI11OWR018532; Tue, 18 Nov 2008 01:01:25 GMT Original-Received: from dradamslap1 (/130.35.179.10) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 18 Nov 2008 01:01:09 +0000 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <873ahq3r0k.fsf@jurta.org> Thread-Index: AclJByyuWW2ysDh0Q6ennCpowL//8gAEUQqQ X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 X-Source-IP: acsmt704.oracle.com [141.146.40.82] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090203.492213D7.0053:SCFSTAT928724,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) 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:105769 Archived-At: > > Actually, after sending the mail and realizing that the > > sequence would always be not just \@ but \@(, I thought > > (and think) that perhaps simply \( would be > > better. This is about passing a list. So I'd propose that. > > > > C-M-% RET abc RET \("" "") > > > > WDOT? > > Then we can perfectly use just the current syntax `\,' > without inventing a new one, e.g. > > C-M-% RET abc RET \,'("" "") Have you tried it? That was the first thing I tried. The problem is that \, converts the sexp that follows it to a string. > The only place currently preventing this is prin1-to-string that turns > a list into a string. We could change it to keep the list intact. Yes, but then you lose the ability to get the current behavior: replace by the string, "(\"zzz\" \"aaa\")". IMO, two different syntaxes are needed to separate the two different user intentions: a sexp that evals to a string "(...)" and a sexp that evals to a list of strings to pass to `perform-replace'. For the second case, I think, as I said, that there is no need to provide for a sexp that evals to the list; it is enough to provide for a literal list. IMO.