From: Eric Hanchrow <offby1@blarg.net>
Subject: Re: creating a tags file for interactive search and replace regexp
Date: Mon, 19 Jun 2006 18:40:13 -0700 [thread overview]
Message-ID: <878xns1u6a.fsf@offby1.atm01.sea.blarg.net> (raw)
In-Reply-To: c5b438120606191712l201027ccgdff0272a5ff64adb@mail.gmail.com
>>>>> "Ryan" == Ryan Krauss <ryanlists@gmail.com> writes:
Ryan> I want to do an interactive regexp search and replace on a
Ryan> list of files. I don't want to search all the files in one
Ryan> directory and the files are actually in many different
Ryan> directories. How do I do this search and replace on a
Ryan> specified list? I think I need a list of tag files. But I
Ryan> cannot find an example of the syntax of such a tag file.
Sometimes I make a TAGS file, and then do tags-query-replace. Read
the man page for etags; it's pretty flexible. Here's an example of a
shell script that creates a TAGS file for certain files only:
find . \
\( \
-type d \
\( -iname boring -prune \) \
-o \( -iname also-boring -prune \) \
\) \
-o \
\( \
-type f \
\( \
-name '*.pas' \
-o -name '*.dfm' \
-o -name '*.p[lm]' \
-o -name '*.js' \
-o -name '*.sql' \
\) -print \
\) | etags -
You can also do "find-dired", then mark any or all of the resulting
files, then type Q (dired-do-query-replace-regexp).
--
One of the fundamental philosophical questions of our time is
why Goofy is a person and Pluto is a dog.
-- Roger Ebert
next prev parent reply other threads:[~2006-06-20 1:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-20 0:12 creating a tags file for interactive search and replace regexp Ryan Krauss
2006-06-20 1:40 ` Eric Hanchrow [this message]
2006-06-20 2:21 ` Ryan Krauss
2006-06-20 13:22 ` Drew Adams
[not found] ` <mailman.3042.1150770081.9609.help-gnu-emacs@gnu.org>
2006-06-20 9:55 ` Mathias Dahl
[not found] <mailman.3061.1150809750.9609.help-gnu-emacs@gnu.org>
2006-06-21 7:57 ` Mathias Dahl
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878xns1u6a.fsf@offby1.atm01.sea.blarg.net \
--to=offby1@blarg.net \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.