unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: chris@grierwhite.com (Christopher J. White)
Subject: Re: recursive query replace regexp
Date: Tue, 14 Jan 2003 08:34:05 -0500	[thread overview]
Message-ID: <m2r8bfua7m.fsf@bluesteel.grierwhite.com> (raw)
In-Reply-To: b010tv$fb6$1@mercur.foa.se

>>>>> "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

  reply	other threads:[~2003-01-14 13:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-14 12:49 recursive query replace regexp Per Nordlöw
2003-01-14 13:34 ` Christopher J. White [this message]
2003-01-14 15:26 ` Kai Großjohann
2003-01-14 21:15 ` kgold

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2r8bfua7m.fsf@bluesteel.grierwhite.com \
    --to=chris@grierwhite.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).