[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [h-e-w] Global search/replace across files?
From: |
Dr Francis J. Wright |
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-,.
> I'm trying to build nmh with cygwin, and the makefiles all contain
>
> SHELL = /bin/sh
>
> For some reason, they only work if I change this to
>
> SHELL = sh
>
> but there's a whole tree of makefiles that all contain this
> string. (NOTE: I can run 'sh', but for some reason, it doesn't run from
> the makefiles and I get an error.)
Can you run /bin/sh using precisely that invocation? Maybe there's a
problem with your Cygwin mounts. It might be better to try to fix that than
hack a lot of files.
Francis