[Top][All Lists]

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

[h-e-w] Re: Global search/replace across files?

From: Raymond Zeitler
Subject: [h-e-w] Re: Global search/replace across files?
Date: Thu, 20 Jun 2002 16:32:12 -0400

Maybe I'm doing something wrong, but after I mark the 100 or so files I want to 
perform a search and replace on, and press Q, and enter the search and 
replacement regexps, I'm forced to press ! about 100 times to do the 
replacement on all the files.  I tried using a prefix argument C-u in front of 
Q, but it then it replaces 0 occurrences.

This is Emacs 21.2 on Win2K.

Shouldn't Q (dired-do-query-replace-regexp) have a "no ask" option?

Shouldn't the mode line indicate how many files are marked?

Right now, it's better for me to use my file manager to drag the files I want 
to change into Emacs and then write a macro to iterate each file, saving it in 
the process.  Incidentally, why isn't there something like a 
dired-find-marked-files command?  And if "Most commands operate on the marked 
files..." why doesn't "f" (dired-find-file)?  Can't I even visit the marked 
files?  Do I really have to use Explorer to visit them?

I'll stop now before my ranting causes you to shoot me.  :)

 -----Original Message-----
From: "Dr Francis J. Wright" <address@hidden>
To: "Peter Davis" <address@hidden>
Cc: <address@hidden>
Subject: Re: [h-e-w] Global search/replace across files?
Date: Sat, 15 Jun 2002 18:08:47 +0100

From: "Peter Davis" <address@hidden>
To: <address@hidden>
Sent: Saturday, June 15, 2002 3:44 PM
Subject: [h-e-w] Global search/replace across files?

> I'm sure there must be a tool for searching and replacing based on regexps
> across files.  I just don't know what it is.  Can anyone enlighten me?

Dired provides such a facility bound to the key Q, or see the bottom of the
Operate menu.  I have found this very useful.

Q runs the command dired-do-query-replace-regexp
   which is an interactive autoloaded Lisp function in `dired-aux'.
[Arg list not available until function definition is loaded.]

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 or ESC), you can resume the query replace
with the command M-,.


reply via email to

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