all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Counting chars
@ 2005-02-22 22:50 Raimund Kohl-Fuechsle
  2005-02-22 23:46 ` Peter Dyballa
  2005-02-23  0:25 ` Drew Adams
  0 siblings, 2 replies; 4+ messages in thread
From: Raimund Kohl-Fuechsle @ 2005-02-22 22:50 UTC (permalink / raw)


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

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

* Re: Counting chars
  2005-02-22 22:50 Counting chars Raimund Kohl-Fuechsle
@ 2005-02-22 23:46 ` Peter Dyballa
  2005-02-23  0:25 ` Drew Adams
  1 sibling, 0 replies; 4+ messages in thread
From: Peter Dyballa @ 2005-02-22 23:46 UTC (permalink / raw)
  Cc: help-gnu-emacs


Am 22.02.2005 um 23:50 schrieb Raimund Kohl-Fuechsle:

> I am looking for a way to count the total sum of chars (whitespaces
> included) in a buffer.

C-x b and then read the numbers in the "Size" column.
Or: M-> C-x = -- you only have to remember to subtract 1. If it counts 
that much.

--
Greetings

   Pete

There are two major products that come out of Berkeley: LSD and UNIX. 
We don't believe this to be a coincidence. - Jeremy S. Anderson

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

* Re: Counting chars
       [not found] <mailman.1160.1109114820.32256.help-gnu-emacs@gnu.org>
@ 2005-02-23  0:19 ` B.T. Raven
  0 siblings, 0 replies; 4+ messages in thread
From: B.T. Raven @ 2005-02-23  0:19 UTC (permalink / raw)



"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

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

* RE: Counting chars
  2005-02-22 22:50 Counting chars Raimund Kohl-Fuechsle
  2005-02-22 23:46 ` Peter Dyballa
@ 2005-02-23  0:25 ` Drew Adams
  1 sibling, 0 replies; 4+ messages in thread
From: Drew Adams @ 2005-02-23  0:25 UTC (permalink / raw)


    I am looking for a way to count the total sum of chars (whitespaces
    included) in a buffer.

`M-=' (count-lines-region) gives the # of characters in a region (as well as
the # of lines. - Drew

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

end of thread, other threads:[~2005-02-23  0:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-22 22:50 Counting chars Raimund Kohl-Fuechsle
2005-02-22 23:46 ` Peter Dyballa
2005-02-23  0:25 ` Drew Adams
     [not found] <mailman.1160.1109114820.32256.help-gnu-emacs@gnu.org>
2005-02-23  0:19 ` 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.