From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: Doing a file filter with grep Date: Fri, 26 Jan 2007 11:29:56 +0200 Message-ID: References: <1169764665.158410.22570@k78g2000cwa.googlegroups.com> NNTP-Posting-Host: lo.gmane.org X-Trace: sea.gmane.org 1169803827 22563 80.91.229.12 (26 Jan 2007 09:30:27 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 26 Jan 2007 09:30:27 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jan 26 10:30:19 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HANPO-0000qp-Tr for geh-help-gnu-emacs@m.gmane.org; Fri, 26 Jan 2007 10:30:11 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HANPO-00081z-DX for geh-help-gnu-emacs@m.gmane.org; Fri, 26 Jan 2007 04:30:10 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HANPB-00081u-TP for help-gnu-emacs@gnu.org; Fri, 26 Jan 2007 04:29:57 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HANP8-00081h-NQ for help-gnu-emacs@gnu.org; Fri, 26 Jan 2007 04:29:56 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HANP8-00081e-HW for help-gnu-emacs@gnu.org; Fri, 26 Jan 2007 04:29:54 -0500 Original-Received: from heller.inter.net.il ([213.8.233.23]) by monty-python.gnu.org with esmtp (Exim 4.52) id 1HANP8-00075m-99 for help-gnu-emacs@gnu.org; Fri, 26 Jan 2007 04:29:54 -0500 Original-Received: from HOME-C4E4A596F7 (IGLD-80-230-36-219.inter.net.il [80.230.36.219]) by heller.inter.net.il (MOS 3.7.3a-GA) with ESMTP id BSF23635 (AUTH halo1); Fri, 26 Jan 2007 11:29:45 +0200 (IST) In-reply-to: <1169764665.158410.22570@k78g2000cwa.googlegroups.com> (jan.sacharuk@gmail.com) X-detected-kernel: FreeBSD 4.7-5.2 (or MacOS X 10.2-10.4) (2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:40667 Archived-At: > From: "RealityMonster" > Date: 25 Jan 2007 14:37:45 -0800 > > So I've been getting find and grep working on my WinXP system with > emacs. I can finally properly search for files and search in files for > the things that I want. I'd like, however, to put a file filter on it, > so I can search just through .h files or .cpp files. > > On the command line, I'd do something like this: > > grep -r Pattern `find . -name *.cpp` After typing "M-x grep RET" inside Emacs, make the Grep command be this: grep -r Pattern . --include="*.cpp" That's it! no need to use `find'.