From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim X Newsgroups: gmane.emacs.help Subject: Re: How to apply a list of regex replaces to multiple files? Date: Tue, 01 Jul 2008 17:01:24 +1000 Organization: Rapt Technologies Message-ID: <87abh2m6kb.fsf@lion.rapttech.com.au> References: <091f39ab-89ac-438f-a878-464309c4a8f6@i18g2000prn.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1214898044 19040 80.91.229.12 (1 Jul 2008 07:40:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 1 Jul 2008 07:40:44 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jul 01 09:41:30 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KDaUT-0003nZ-Ih for geh-help-gnu-emacs@m.gmane.org; Tue, 01 Jul 2008 09:41:29 +0200 Original-Received: from localhost ([127.0.0.1]:58149 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KDaTd-0007HX-78 for geh-help-gnu-emacs@m.gmane.org; Tue, 01 Jul 2008 03:40:37 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local02.nntp.dca.giganews.com!nntp.posted.internode!news.posted.internode.POSTED!not-for-mail Original-NNTP-Posting-Date: Tue, 01 Jul 2008 02:01:41 -0500 Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:CHB008LizztOGVtCRgii4GpDusg= Original-Lines: 16 X-Usenet-Provider: http://www.giganews.com Original-NNTP-Posting-Host: 121.44.68.221 Original-X-Trace: sv3-gj3ofpmr3zHDypwq0qNmCuqBJEjrTGK8QS4h8Eh392x70HhSKFiy4cJ9T8PC1JcVMhoDP1Jx7uoOV3F!FFOYS8N/dpwhcxmwR9ZREM1+bmyKlWNPpb8F4yTHX4WKiuwSXjobvf6ABM3TwTSX7j2bGiKhbA== X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.39 Original-Xref: news.stanford.edu gnu.emacs.help:159818 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:55171 Archived-At: "michael.l" writes: > I've browsed the messages here and have googled but don't see a clear > solution yet. I have about 900 documents to which I need to apply a > list of maybe 40 separate regex search and replaces. I would like to > feed a list of the regex expressions and replacements to emacs and > have it applied to a directory of the files. Any solutions? Keyboard > macros don't seem like the right solution.... If all the files are in one directory, you could probably do this with dired? Tim -- tcross (at) rapttech dot com dot au