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

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

Re: [h-e-w] Searching on Windows (find, grep, and indexed search)


From: Eli Zaretskii
Subject: Re: [h-e-w] Searching on Windows (find, grep, and indexed search)
Date: Sat, 29 Sep 2007 18:11:11 +0200

> Date: Fri, 28 Sep 2007 14:26:50 -0600
> From: "Scott Jaderholm" <address@hidden>
> 
> 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

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