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

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

Re: Word count in Emacs


From: Jambunathan K
Subject: Re: Word count in Emacs
Date: Fri, 14 Sep 2012 23:44:38 +0530
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux)

M-x count- TAB

or 

M-= (does exactly what you are trying to do here, I suppose)

"B. T. Raven" <btraven@nihilo.net> writes:

> Can anyone give me a clue why the following doesn't print a number in
> the mini-buffer or to the *Messages* buffer?:
>
> (defun count-words (start end) ;; alias wce
>     "Print number of words in the region."
>     (interactive "r")
>     (save-excursion
>       (save-restriction
>         (narrow-to-region start end)
>         (goto-char (point-min))
>         (count-matches "\\sw+"))))
>
> an alias is assigned so that I can invoke with
>
> M-x wce (word count emacs)
>
> Thanks,
>
> Ed
>

-- 



reply via email to

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