From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jambunathan K Newsgroups: gmane.emacs.devel Subject: Re: Rethinking count-words-region Date: Fri, 07 Oct 2011 22:16:46 +0530 Message-ID: <81ehyo4umh.fsf@gmail.com> References: <87vcs0q05l.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1318006036 16060 80.91.229.12 (7 Oct 2011 16:47:16 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 7 Oct 2011 16:47:16 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 07 18:47:12 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 1RCDZl-0008VR-M8 for ged-emacs-devel@m.gmane.org; Fri, 07 Oct 2011 18:47:09 +0200 Original-Received: from localhost ([::1]:44573 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RCDZk-0001oH-Mf for ged-emacs-devel@m.gmane.org; Fri, 07 Oct 2011 12:47:08 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:39344) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RCDZi-0001nh-6E for emacs-devel@gnu.org; Fri, 07 Oct 2011 12:47:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RCDZh-0005dz-1A for emacs-devel@gnu.org; Fri, 07 Oct 2011 12:47:06 -0400 Original-Received: from mail-pz0-f47.google.com ([209.85.210.47]:53251) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RCDZg-0005dt-Sq for emacs-devel@gnu.org; Fri, 07 Oct 2011 12:47:04 -0400 Original-Received: by pzk4 with SMTP id 4so10907326pzk.6 for ; Fri, 07 Oct 2011 09:47:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:references:mail-followup-to:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=npfOnH0dFTPAeAgvg9+1BXFDNMBQpDEIw3G2Xjkj3EM=; b=Ccpyz/tgMqcwkGYGqL5Td9rEVhOzoxsv5j2GF3iwnG465mMmW/JICuZO2SU1b66J8/ jzZRTE8q6Eo5a+qrn1RSxU3DW4zG7mYNkn5nXxTE4LQutE/r0T49byIcgtMxgWlKm0vr IpYO7kkBcw120rW8uGbBLIPoKMlQQ8XQ16A+c= Original-Received: by 10.68.9.7 with SMTP id v7mr14910793pba.94.1318006023628; Fri, 07 Oct 2011 09:47:03 -0700 (PDT) Original-Received: from JAMBU-NETBOOK ([115.242.177.132]) by mx.google.com with ESMTPS id h5sm32888221pbq.11.2011.10.07.09.46.56 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 07 Oct 2011 09:47:01 -0700 (PDT) Mail-Followup-To: emacs-devel@gnu.org In-Reply-To: <87vcs0q05l.fsf@stupidchicken.com> (Chong Yidong's message of "Fri, 07 Oct 2011 11:41:42 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (windows-nt) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.210.47 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:144704 Archived-At: > 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. FWIW, what constitutes a word is also mode dependent. Here is a link from the Orgmode mailing list. http://thread.gmane.org/gmane.emacs.orgmode/37762/focus=38014 > Maybe we could rename the combined function something like `count-text' > (better suggestions welcome). Let the function name have `statistics' or `stats' in it (for eg `region-stats'). This way it will be future compatible. FWIW, LibreOffice reports following stats on a document: 1. No. of Pages 2. No. of Tables 3. No. of Graphics 4. No. of Paragraphs 5. No. of Words 6. No. of Characters 7. No. of Characters excluding spaces 8. No. of lines --