From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Sexton Subject: Re: Context-sensitive word count in org mode (elisp) Date: Wed, 16 Feb 2011 23:31:23 +0000 (UTC) Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=50528 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ppqto-0005j0-7N for emacs-orgmode@gnu.org; Wed, 16 Feb 2011 18:35:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ppqtn-0000TW-6N for emacs-orgmode@gnu.org; Wed, 16 Feb 2011 18:35:08 -0500 Received: from lo.gmane.org ([80.91.229.12]:45180) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ppqtm-0000TQ-SU for emacs-orgmode@gnu.org; Wed, 16 Feb 2011 18:35:07 -0500 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Ppqtm-0001pw-0C for emacs-orgmode@gnu.org; Thu, 17 Feb 2011 00:35:06 +0100 Received: from rp.young.med.auckland.ac.nz ([130.216.140.20]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 17 Feb 2011 00:35:05 +0100 Received: from psexton by rp.young.med.auckland.ac.nz with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 17 Feb 2011 00:35:05 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org That looks really good. My suggestion would be to modify it so that 'wc-count' can be redefined on a per-major-mode or per-buffer basis, eg via a buffer-local variable 'wc-count-function'. Then my org-word-count function could be slotted in fairly easily - I would just have to modify it so that it *returns* the count, rather than reporting it. Paul