Discussion:
FAQ suggestion: how to do query-replace across many files
Eric Hanchrow
2006-05-05 23:06:03 UTC
Permalink
Occasionally people on the freenode IRC channel #emacs ask

how do I query-replace on files, *recursively*?

The best answer I know of is:

* do M-x find-dired
* hit 't' to mark all the files
* hit Q to run dired-do-query-replace-regexp
* hit ! once for each visited file
--
... belief in the omniscient hacker is indistinguishable from
belief in a Supreme Being. There is simply no argument one can
give that will dissuade a true believer, yet when the believer is
asked for a demonstration he is unable to produce one.
-- Michael Shamos
Romain Francoise
2006-05-07 17:13:21 UTC
Permalink
Post by Eric Hanchrow
Occasionally people on the freenode IRC channel #emacs ask
how do I query-replace on files, *recursively*?
This is already covered in the Emacs FAQ, node 5.40 (``How do I perform
a replace operation across more than one file?''), but the node was
somewhat terse so I expanded it based on your suggestions. Thanks!
--
Romain Francoise <romain at orebokech.com> | The sea! the sea! the open
it's a miracle -- http://orebokech.com/ | sea! The blue, the fresh, the
| ever free! --Bryan W. Procter
Loading...