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

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

Re: Counting chars


From: B.T. Raven
Subject: Re: Counting chars
Date: Tue, 22 Feb 2005 18:19:12 -0600

"Raimund Kohl-Fuechsle" <Raimund.Kohl@nabuli.de> wrote in message
news:mailman.1160.1109114820.32256.help-gnu-emacs@gnu.org...
> Hello,
>
> I am looking for a way to count the total sum of chars (whitespaces
> included) in a buffer.  I couldn't find an existing solution via
google
> ... anyone any idea?
>
> ray
>
>

C-x = will report the character position of point and the total number
of characters. For example, in my current buffer it reports 1417743
total characters in buffer, while Dos (via shell with command prompt)
shows a file size of 1572128. The difference is accounted for by the CR
LF pairs at the end of each line (or maybe LF if the file is in a Unix
like text file format).

If you have Cygwin or if you're running Linux you can use the wc program
(line, word, character count) but this probably includes the end of line
characters which you probably don't want.

Ed


reply via email to

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