From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: filebat Mark Newsgroups: gmane.emacs.help Subject: When grep-find, show the count of matches Date: Mon, 28 Jun 2010 17:59:25 +0800 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=000e0cd2e302f66798048a142c06 X-Trace: dough.gmane.org 1277719239 22916 80.91.229.12 (28 Jun 2010 10:00:39 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 28 Jun 2010 10:00:39 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jun 28 12:00:37 2010 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.69) (envelope-from ) id 1OTB8m-0003TG-5B for geh-help-gnu-emacs@m.gmane.org; Mon, 28 Jun 2010 12:00:36 +0200 Original-Received: from localhost ([127.0.0.1]:43684 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OTB8l-0006FY-G5 for geh-help-gnu-emacs@m.gmane.org; Mon, 28 Jun 2010 06:00:35 -0400 Original-Received: from [140.186.70.92] (port=36190 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OTB7i-0006C6-Ah for help-gnu-emacs@gnu.org; Mon, 28 Jun 2010 05:59:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OTB7e-0005Qq-Ue for help-gnu-emacs@gnu.org; Mon, 28 Jun 2010 05:59:28 -0400 Original-Received: from mail-pv0-f169.google.com ([74.125.83.169]:49675) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OTB7e-0005QV-PA for help-gnu-emacs@gnu.org; Mon, 28 Jun 2010 05:59:26 -0400 Original-Received: by pvg11 with SMTP id 11so3260511pvg.0 for ; Mon, 28 Jun 2010 02:59:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=C+/uPkGs0rjyM9XN8r6D4h6ecPhoCC2ij6n2UxmVhMg=; b=amhRGWR0PNfZqs+WtwFyoQEij30YkforUvrHAY9maGlMJ3F5cZ7T21eHbbbPrHnF65 EwZ58DdEIjV9VkH11sH/gddpkPFL8Wwz8COc6eZQZNoLqWSEA8zpFsl7p9LPO39kLAsj r78DFMfRZaAJk4gcN5Rp3h+51yb8bNapBNJnQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=Js3idcKRKX2yfAvDSYEkDqBcY1qdVlZD6UN8JfjCzeQ4cCYt+H0CK3U/8h7E4v0AYW KewMdmSO6oOQHrHuEmGTMg+MHOhmTKwjcfJiP0ZSxifyT2Fo1Kcpxz3MohC6GEpNAOSX FNF2iaQ7UP+izpM+4tLCX4X8WV/VM33fA0M+g= Original-Received: by 10.142.202.17 with SMTP id z17mr5279386wff.140.1277719165167; Mon, 28 Jun 2010 02:59:25 -0700 (PDT) Original-Received: by 10.142.194.17 with HTTP; Mon, 28 Jun 2010 02:59:25 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 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:73993 Archived-At: --000e0cd2e302f66798048a142c06 Content-Type: text/plain; charset=ISO-8859-1 Hi emacsers I am wondering how to show the count of matches when grep-find. Like the following. ,----------- | -*- mode: grep; default-directory: "d:/ntemacs23/myemacs/private_data/out_of_svn/" -*- | Grep started at Mon Jun 28 17:46:18 | | find . -name ".svn" -prune -o -type f -print0 | xargs -0 -e grep -inH -e emacs | ./#tmp.txt#:7:#+TAGS: ARCHIVE(a) WEBPAGE(w) LIFE(l) EMACS(e) IMPORTANT(i) HARD(h) COMPUTER(c) RECOMMENDATE(r) Tool(t) | ./#tmp.txt#:47438:* TODO log4j-mode in emacs | ./#tmp.txt#:47529:Hi emacsers | ./tmp.html:554:

HTML generated by org-mode 6.35i in emacs 23

| ./tmp.html~:153:

HTML generated by org-mode 6.35i in emacs 23

| ./tmp.txt:7:#+TAGS: ARCHIVE(a) WEBPAGE(w) LIFE(l) EMACS(e) IMPORTANT(i) HARD(h) COMPUTER(c) RECOMMENDATE(r) Tool(t) | ./tmp.txt:47438:* TODO log4j-mode in emacs | | Grep finished (7 matches found) at Mon Jun 28 17:46:20 `----------- IMHO, one feasible way may be counting the output of *grep* buffer. Before moving any further, I am very willing to hear your ideas, comment or codesnipet for this? -- Thanks & Regards Denny Zhang --000e0cd2e302f66798048a142c06 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi emacsers

I am wondering how to show the count of matches when gre= p-find. Like the following.
,-----------
| -*- mode: grep; default-di= rectory: "d:/ntemacs23/myemacs/private_data/out_of_svn/" -*-
| Grep started at Mon Jun 28 17:46:18
|
|=A0 find . -name ".svn= " -prune -o -type f -print0 | xargs -0 -e grep -inH -e emacs
| ./#t= mp.txt#:7:#+TAGS: ARCHIVE(a) WEBPAGE(w) LIFE(l) EMACS(e) IMPORTANT(i) HARD(= h) COMPUTER(c) RECOMMENDATE(r) Tool(t)
| ./#tmp.txt#:47438:* TODO log4j-mode in emacs
| ./#tmp.txt#:47529:Hi em= acsers
| ./tmp.html:554:<p class=3D"creator">HTML genera= ted by org-mode 6.35i in emacs 23</p>
| ./tmp.html~:153:<p clas= s=3D"creator">HTML generated by org-mode 6.35i in emacs 23<= /p>
| ./tmp.txt:7:#+TAGS: ARCHIVE(a) WEBPAGE(w) LIFE(l) EMACS(e) IMPORTANT(i) H= ARD(h) COMPUTER(c) RECOMMENDATE(r) Tool(t)
| ./tmp.txt:47438:* TODO log4= j-mode in emacs
|
| Grep finished (7 matches found) at Mon Jun 28 17= :46:20
`-----------

IMHO, one feasible way may be counting the output of *g= rep* buffer.
Before moving any further, I am very willing to hear your i= deas, comment or codesnipet for this?

--
Thanks & Regards
Denny Zhang
--000e0cd2e302f66798048a142c06--