> Date: Fri, 28 Sep 2007 14:26:50 -0600
> From: "Scott Jaderholm" <[EMAIL PROTECTED]>
> 
> I'm looking for a simple, interactive way to do four basic types of
> searches from within Emacs on Windows.

There's more than one way of doing this in Emacs.  Lennart suggested a
few; let me suggest others:

> Search:
> 1 - directory for file named "string"
> 2 - directory for file containing "string"

These two can be handled by the `% m <regexp> RET' command in Dired.

> 3 - file for lines containing "string"

A single file? then "M-x occur" would be the best, I think.  If you
need to find several files with matching lines, try `% g REGEXP RET'
in Dired: it will mark all matching files, and you can then visit them
or do some operation on them using other Dired commands.  There's also
`A REGEXP RET', which searches files that are already marked (perhaps
because their names matched a pattern used with `% m').

> 4 - and replace all occurrences of "string" in files in directory

For this, I recommend `Q <regexp> RET <replacement> RET' in Dired.


Reply via email to