unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Rethinking count-words-region
@ 2011-10-07 15:41 Chong Yidong
  2011-10-07 16:46 ` Jambunathan K
                   ` (4 more replies)
  0 siblings, 5 replies; 28+ messages in thread
From: Chong Yidong @ 2011-10-07 15:41 UTC (permalink / raw)
  To: emacs-devel

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).



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

end of thread, other threads:[~2011-10-09  1:05 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-07 15:41 Rethinking count-words-region Chong Yidong
2011-10-07 16:46 ` Jambunathan K
2011-10-08 16:53   ` Chong Yidong
2011-10-08 18:00     ` Andreas Röhler
2011-10-07 18:08 ` Eli Zaretskii
2011-10-07 20:51   ` Chong Yidong
2011-10-07 20:55     ` Chong Yidong
2011-10-08 17:58       ` Andreas Röhler
2011-10-08 18:11         ` Drew Adams
2011-10-08 18:23           ` Chong Yidong
2011-10-08 18:25             ` Drew Adams
2011-10-08 18:29               ` Alan Mackenzie
2011-10-08 19:04                 ` Lars Ingebrigtsen
2011-10-08 19:28                 ` Juri Linkov
2011-10-08 18:40             ` Andreas Röhler
2011-10-08  6:22     ` Eli Zaretskii
2011-10-07 20:29 ` Andreas Röhler
2011-10-07 20:55 ` Alan Mackenzie
2011-10-08 16:52 ` Chong Yidong
2011-10-08 17:51   ` Andreas Röhler
2011-10-08 20:04   ` Juri Linkov
2011-10-08 20:46     ` Chong Yidong
2011-10-08 21:09       ` Juri Linkov
2011-10-08 20:49     ` Drew Adams
2011-10-08 21:12       ` Juri Linkov
2011-10-08 21:33         ` Drew Adams
2011-10-09  0:57           ` chad
2011-10-09  1:05             ` Drew Adams

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).