[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: recursive query replace regexp
From: |
Christopher J. White |
Subject: |
Re: recursive query replace regexp |
Date: |
Tue, 14 Jan 2003 08:34:05 -0500 |
User-agent: |
Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.2 (powerpc-apple-darwin) |
>>>>> "per" == Per Nordlöw <per@foi.se> writes:
per> Is there any way to perform an interactive replace (query-replace) of
per> regular expressions recursively in all or some (specified by a regular
per> expression) files present in a directory tree.
Not sure what you mean by recursively, but if you just mean
doing the equivalent of query-replace-regexp on mulitple
files, take a look at etags:
1) First make a 'TAGS' file to include the files you want (shell)
$ etags `find . -name "*.blah.*.foo"`
This makes a TAGS file in the current directory
2) In emacs, do M-x tags-query-replace. It will query
for from-expression, to-expression, then the location
of the TAGS file.
etags is extremely powerful for language specific
stuff, but works just fine for iterating over
a set of files.
...cj