From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "B. T. Raven" Newsgroups: gmane.emacs.help Subject: Word count in Emacs Date: Fri, 14 Sep 2012 12:55:44 -0500 Organization: NewsGuy - Unlimited Usenet $19.95 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1347645617 24003 80.91.229.3 (14 Sep 2012 18:00:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 14 Sep 2012 18:00:17 +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 Sep 14 20:00:20 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TCaBg-0001Be-F6 for geh-help-gnu-emacs@m.gmane.org; Fri, 14 Sep 2012 20:00:20 +0200 Original-Received: from localhost ([::1]:43886 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCaBZ-0007Gj-CE for geh-help-gnu-emacs@m.gmane.org; Fri, 14 Sep 2012 14:00:13 -0400 Original-Path: usenet.stanford.edu!news.glorb.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!spln!extra.newsguy.com!newsp.newsguy.com!news6 Original-Newsgroups: gnu.emacs.help Original-Lines: 19 Original-NNTP-Posting-Host: p47c434ddc697368a860ddbe6511771fea81d469da6a3b158.newsdawg.com User-Agent: Mozilla/5.0 (Windows NT 5.0; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 X-Received-Bytes: 1093 Original-Xref: usenet.stanford.edu gnu.emacs.help:194430 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:86770 Archived-At: 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