From: thorne <thinly-disguised@spam-sucks.foo>
To: help-gnu-emacs@gnu.org
Subject: Re: Counting words
Date: Thu, 12 Apr 2007 06:14:14 -0700 [thread overview]
Message-ID: <m3odltlopl.fsf@timbral.net> (raw)
In-Reply-To: 461d3a10$0$90263$14726298@news.sunsite.dk
> 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"))
next prev parent reply other threads:[~2007-04-12 13:14 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.1903.1176202249.7795.help-gnu-emacs@gnu.org>
2007-04-10 11:05 ` Counting words Robert D. Crawford
2007-04-10 11:46 ` "Wilfred Zegwaard (privé)"
2007-04-10 15:13 ` Peter Dyballa
2007-04-10 17:37 ` "Wilfred Zegwaard (privé)"
[not found] ` <mailman.1904.1176205848.7795.help-gnu-emacs@gnu.org>
2007-04-11 19:42 ` Colin S. Miller
2007-04-12 13:14 ` thorne [this message]
2007-04-12 21:06 ` Fuzzy search (was: Counting words) "Wilfred Zegwaard (privé)"
2007-04-12 21:43 ` Peter Dyballa
2007-04-12 22:20 ` "Wilfred Zegwaard (privé)"
2007-04-10 10:46 Counting words "Wilfred Zegwaard (privé)"
[not found] <E1AQYTg-0008GI-SU@monty-python.gnu.org>
2003-11-30 20:55 ` Masashi Ito
-- strict thread matches above, loose matches on Subject: below --
2003-11-30 18:54 David Sumbler
2003-11-30 19:03 ` Jesper Harder
2003-11-30 20:03 ` David Sumbler
2003-11-30 23:51 ` Matthias Mees
2003-12-01 1:55 ` Roodwriter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3odltlopl.fsf@timbral.net \
--to=thinly-disguised@spam-sucks.foo \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.