From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: thorne Newsgroups: gmane.emacs.help Subject: Re: Counting words Date: Thu, 12 Apr 2007 06:14:14 -0700 Organization: impossible. Message-ID: References: <461d3a10$0$90263$14726298@news.sunsite.dk> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1176384991 23845 80.91.229.12 (12 Apr 2007 13:36:31 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 12 Apr 2007 13:36:31 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Apr 12 15:36:22 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 1HbzTH-0003DP-A5 for geh-help-gnu-emacs@m.gmane.org; Thu, 12 Apr 2007 15:36:19 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HbzXR-0000EM-11 for geh-help-gnu-emacs@m.gmane.org; Thu, 12 Apr 2007 09:40:37 -0400 Original-Path: shelby.stanford.edu!headwall.stanford.edu!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!news.germany.com!aioe.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 42 Original-NNTP-Posting-Host: xwsRWiKvRGrGFeJyiuDlQw.user.aioe.org Original-X-Complaints-To: abuse@aioe.org Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAMFBMVEVHQD/3+vz9+/4lPlF4 kLzv5t79/f/9+PWnTVUiJy5JV3KkoIj////Mx8YWFBP9+vzFQ3bFAAACMUlEQVQ4jb3RP2gTURwH 8HPocCmNnNAI1SJZMikOl+UibpkOHCqciiGUy/CEehKXFFGKa8ClUJd3B2fksvRC04QaJTnOUIcb JJJ2SKDGSNcr+KNXMEMQnodJte+Srj5404fv+/15TOucw/xXcMj1c8CbBl/2EbpxdwrIO8Idbis2 BRobPM9XKfgUy1xOvxP5BM/HL3FZOeKMQB4gbmmxkTR5gzeaOekkNgbEPZLSKcM0/Kf428vzS8hR /kDWWcvbvQ1ewP69xfWlyLhGZvdZ/gO3KcykKqqlcWvWqjICRc69ekl2hDnJP2r0QX4VjbtyCPHk A8zMdqTKCEY1Wu0s4hbrQsLg6/FENNc5UZTTAR20oJeKoqgmC902cs5M3v65Z5mm2CgmulGkoH/Q cl4wltVJN0IRP6Cc3dVuT7X7/frMr4klVsyE1RDWvwVhBSeTSVEAWw7AMS6K2ATYukYD+ghFERiA 6oCCNmEhLgLW4YJHgfMY4LWoY4AjQsOxDsWkvg4A3WnAuDpcpGFBB8MEH+waDUMtXcF+Da2WpmHe lr5iF7uaRSdapNdnsAug9pbpxIAM1bDfk0boAVso87yAwdXfogD422V9YKsTa39isnrZxdtXg/C5 gI/KLvNmIrEShh/lQ3Yyscfq298B9hUaHPQwfHh/OFuY8wJdyQeVQ/LUtTZt+gedQaFRbl4B1TSb NHhaKfw+mq6EmMB/cKUQc0++6RHCBbpKWbW/ZSlwEAnAb3NDHSx48elnAAAAAElFTkSuQmCC Cancel-Lock: sha1:DlA2QzxpGbhNo7+C8XgSC6bvp8Y= User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.51 (gnu/linux) Original-Xref: shelby.stanford.edu gnu.emacs.help:147012 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:42616 Archived-At: > Wilfred Zegwaard (privé) wrote: >> I found the wordcount thing. >> I mean specific instances of words. The number of times eg that >> "the" occurs in a text. But I need to search on specific >> combinations, like "the exact word", but also a fuzzy search on >> specific combinations. My versions of Emacs i use (22 and 23) both have an interactive function called `how-many' (aliased to `count-matches' also) that counts the number of matches for a regexp in a buffer. Is that what you are looking for? I was just using it last night editing a large fiction work to look for possibly overused words. ,----[ C-h f how-many RET ] | how-many is an interactive compiled Lisp function in `replace.el'. | (how-many regexp &optional rstart rend interactive) | | Print and return number of matches for regexp following point. | When called from Lisp and interactive is omitted or nil, just return | the number, do not print it; if interactive is t, the function behaves | in all respects has if it had been called interactively. | | If regexp contains upper case characters (excluding those preceded by `\'), | the matching is case-sensitive. | | Second and third arg rstart and rend specify the region to operate on. | | Interactively, in Transient Mark mode when the mark is active, operate | on the contents of the region. Otherwise, operate from point to the | end of (the accessible portion of) the buffer. | | This function starts looking for the next match from the end of | the previous match. Hence, it ignores matches that overlap | a previously found match. `---- -- þ theron tlåx þ (compose-mail (concat "thorne@" (rot13 "gvzoeny") ".net"))