help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to apply a list of regex replaces to multiple files?


From: David Kastrup
Subject: Re: How to apply a list of regex replaces to multiple files?
Date: Tue, 01 Jul 2008 07:23:06 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

"michael.l" <address@hidden> 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....

dired-do-query-replace-regexp is an interactive compiled Lisp function
in `dired-aux.el'.

It is bound to Q, <menu-bar> <operate> <query-replace>.

(dired-do-query-replace-regexp FROM TO &optional DELIMITED)

Do `query-replace-regexp' of FROM with TO, on all marked files.
Third arg DELIMITED (prefix arg) means replace only word-delimited matches.
If you exit (C-g, RET or q), you can resume the query replace
with the command M-,.


-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum


reply via email to

[Prev in Thread] Current Thread [Next in Thread]