all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Word count in Emacs
@ 2012-09-14 17:55 B. T. Raven
  2012-09-14 18:14 ` Jambunathan K
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: B. T. Raven @ 2012-09-14 17:55 UTC (permalink / raw
  To: help-gnu-emacs

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-09-15 23:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-14 17:55 Word count in Emacs B. T. Raven
2012-09-14 18:14 ` Jambunathan K
2012-09-14 19:28 ` Alp Aker
     [not found] ` <mailman.8893.1347650994.855.help-gnu-emacs@gnu.org>
2012-09-15 23:11   ` B. T. Raven
     [not found] ` <mailman.8880.1347646427.855.help-gnu-emacs@gnu.org>
2012-09-15 23:23   ` B. T. Raven

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.