From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-15?Q?Andreas_R=F6hler?= Newsgroups: gmane.emacs.devel Subject: Re: Rethinking count-words-region Date: Fri, 07 Oct 2011 22:29:31 +0200 Message-ID: <4E8F612B.1060401@online.de> References: <87vcs0q05l.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1318019386 12424 80.91.229.12 (7 Oct 2011 20:29:46 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 7 Oct 2011 20:29:46 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 07 22:29:43 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RCH37-0005Vu-IG for ged-emacs-devel@m.gmane.org; Fri, 07 Oct 2011 22:29:41 +0200 Original-Received: from localhost ([::1]:48811 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RCH36-0004qj-Rq for ged-emacs-devel@m.gmane.org; Fri, 07 Oct 2011 16:29:40 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:54191) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RCH33-0004qb-ST for emacs-devel@gnu.org; Fri, 07 Oct 2011 16:29:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RCH32-0004E7-RN for emacs-devel@gnu.org; Fri, 07 Oct 2011 16:29:37 -0400 Original-Received: from moutng.kundenserver.de ([212.227.17.8]:50483) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RCH32-0004Dv-As for emacs-devel@gnu.org; Fri, 07 Oct 2011 16:29:36 -0400 Original-Received: from [192.168.178.27] (brln-4db9f027.pool.mediaWays.net [77.185.240.39]) by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis) id 0MIPk7-1R8AB12IzH-003gqL; Fri, 07 Oct 2011 22:29:33 +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 In-Reply-To: <87vcs0q05l.fsf@stupidchicken.com> X-Provags-ID: V02:K0:4+E6Lq9uDeGRW9p2QCQ1uwqzetFtqJS7Al57/4XC84s +hpIVuJNiI+kB1cv4NAwOG5CGWUzRdsaIPjqRAqCzpGD0ohIeS VncvYH7RsVRJhQJr++H14iowq48Wpfm/AbXvRQjqY8A7Vi/uP9 JgehQyl3CL9YOQukXRB0DCr/lr//uLzSB7iU1r1oCFnDtjakUh b8tr/sqYd5hTh9emucbsbk5E10E8YN1RZLOYeMh6dhbi9dc5Gx 7UzOd+tDotFzE1L4NviS7TFabn2tbl9WNLlOedfpZqRzl07uSi DYPz1pwvwX4ZLStm4K5LbULrScQhDEW90uchTwC14ngAhQ9ppQ QBRcH2W/cBLIlT+Rjg011aRxYkhQadVu54aDEvaXx X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 212.227.17.8 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:144720 Archived-At: 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