From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: M-% in macro Date: Mon, 30 Jan 2012 10:41:12 -0800 Message-ID: <445DD6429B1349B0BBD28FA9747FE290@us.oracle.com> References: <33227962.post@talk.nabble.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1327948896 28610 80.91.229.3 (30 Jan 2012 18:41:36 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 30 Jan 2012 18:41:36 +0000 (UTC) To: "'Daniel Aronovitch'" , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jan 30 19:41:35 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RrwAZ-0003pM-FF for geh-help-gnu-emacs@m.gmane.org; Mon, 30 Jan 2012 19:41:35 +0100 Original-Received: from localhost ([::1]:57085 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RrwAZ-00082f-3e for geh-help-gnu-emacs@m.gmane.org; Mon, 30 Jan 2012 13:41:35 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:42511) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RrwAQ-00081L-0P for Help-gnu-emacs@gnu.org; Mon, 30 Jan 2012 13:41:31 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RrwAI-0002tb-SD for Help-gnu-emacs@gnu.org; Mon, 30 Jan 2012 13:41:25 -0500 Original-Received: from acsinet15.oracle.com ([141.146.126.227]:46095) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RrwAI-0002tN-N7 for Help-gnu-emacs@gnu.org; Mon, 30 Jan 2012 13:41:18 -0500 Original-Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by acsinet15.oracle.com (Switch-3.4.4/Switch-3.4.4) with ESMTP id q0UIfF2v024672 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 30 Jan 2012 18:41:15 GMT Original-Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q0UIfDKt003135 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 30 Jan 2012 18:41:14 GMT Original-Received: from abhmt120.oracle.com (abhmt120.oracle.com [141.146.116.72]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q0UIfDfw002759; Mon, 30 Jan 2012 12:41:13 -0600 Original-Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 30 Jan 2012 10:41:12 -0800 X-Mailer: Microsoft Office Outlook 11 Thread-Index: AczffUsNsHDYiSpGRHSggKFc57l4KQAALwyA In-Reply-To: <33227962.post@talk.nabble.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: ucsinet22.oracle.com [156.151.31.94] X-CT-RefId: str=0001.0A090201.4F26E44C.0043,ss=1,re=0.000,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 141.146.126.227 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:83573 Archived-At: > For some reasons, I've to perform every day a series of > search/replace on a > auto generated text file. I've no possibility to access the code that > generate that file to correct the mistakes. So, what I did is > a macro in emacs that performs those search/replace all, that is > with a "!" as last input of each search/replace command. My problem > is that if there is no occurrence of one specific search that might > appear on the next day, the "!" is understood as a typed character > and not anymore as "replace all" and hence is inserted in the text, > which is an annoyance. Does anyone have a idea on how I could > avoid that problem. Thanks. DA Sounds like you do not really want/need a query-replace dialog. See command `replace-string'. If you want to use Lisp instead of a keyboard macro for this, then see the note in the `replace-string' doc string about what to use in Lisp.