emacs-devel
[Top][All Lists]
Advanced

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

Re: Rethinking count-words-region


From: Andreas Röhler
Subject: Re: Rethinking count-words-region
Date: Fri, 07 Oct 2011 22:29:31 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.2.23) Gecko/20110920 SUSE/3.1.15 Thunderbird/3.1.15

Am 07.10.2011 17:41, schrieb Chong Yidong:
The command `count-words-region', newly introduced for Emacs 24, is
inconsistent with the pre-existing `count-lines-region'.  If no region
is active, the former reports the number of words in the buffer
(implemented in Bug#9429).  The latter always reports the number of
lines in the region, whether or not it is active.

The two ought to be consistent.  The behavior of `count-words-region' is
the better one, I think, even if adopting it incurs some backward
incompatibility.

But going beyond this, instead of introducing a separate
`count-words-region' command, why not fold this functionality into
`count-lines-region'?  After all, `count-lines-region' already reports
the number of characters, and there's space for it to report the number
of words too.  And it has a convenient binding in M-=, whereas
`count-words-region' has no default binding.

Maybe we could rename the combined function something like `count-text'
(better suggestions welcome).



Hi,

simply "count-words", "count-lines" seems better for me.
A lot of other function restrict to region already, if active.
User may assume that.

When -region is mentioned explicitly, it should require it, not operate on the whole buffer.

Cheers,

Andreas




reply via email to

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