From: Francesco Scaglioni <fgs@epulse.net>
Subject: Re: Count characters in emacs?
Date: Wed, 26 Feb 2003 11:09:09 +0000 (GMT) [thread overview]
Message-ID: <20030226.110909.74722278.fgs@epulse.net> (raw)
In-Reply-To: <1438-Tue25Feb2003215529+0200-eliz@elta.co.il>
I have this is what I call misc.el which gets loaded at run time --
relies on the aforementioned WC but works fine with M-x wc return. I
did not write this myself but cannnot remember where I cribbed it from
( all credit goes to whoever it was ).
Cheers
F
;; WORD COUNT
(defun wc ()
"Count the words in the current buffer, show the result in the
minibuffer"
(interactive)
(save-excursion
(save-restriction
(widen)
(goto-char (point-min))
(let ((count 0))
(while (forward-word 1)
(setq count(1+ count)))
(message "There are %d words in the buffer" count)))))
next prev parent reply other threads:[~2003-02-26 11:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-25 19:48 Count characters in emacs? Big Slim
2003-02-25 19:55 ` Eli Zaretskii
2003-02-26 11:09 ` Francesco Scaglioni [this message]
2003-02-25 19:57 ` Aaron Son
2003-02-25 20:21 ` Big Slim
2003-02-25 21:18 ` Stefan Monnier
2003-02-25 23:58 ` Big Slim
2003-02-26 9:16 ` Kai Großjohann
2003-02-26 18:15 ` Pascal Bourguignon
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030226.110909.74722278.fgs@epulse.net \
--to=fgs@epulse.net \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).