From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: word count checklist? Date: Mon, 26 Jul 2010 16:33:25 -0600 Message-ID: <87y6cxdgay.fsf@gmail.com> References: <20100726155303.124c6396@bigblessing.tville> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=41410 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OdWEm-000421-Ip for emacs-orgmode@gnu.org; Mon, 26 Jul 2010 18:33:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OdWEl-0001eN-7z for emacs-orgmode@gnu.org; Mon, 26 Jul 2010 18:33:32 -0400 Received: from mail-px0-f169.google.com ([209.85.212.169]:34748) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OdWEk-0001eC-UL for emacs-orgmode@gnu.org; Mon, 26 Jul 2010 18:33:31 -0400 Received: by pxi7 with SMTP id 7so485112pxi.0 for ; Mon, 26 Jul 2010 15:33:29 -0700 (PDT) In-Reply-To: <20100726155303.124c6396@bigblessing.tville> (scrawler@gmail.com's message of "Mon, 26 Jul 2010 15:53:03 -0500") 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: scrawler@gmail.com Cc: Org Mode The following org-mode file uses a Babel code block to return the ratio of the number of words in the current buffer against the word-goal variable as a percent. Note that it doesn't take into account the words used in the code block, so that may be worth adding to the word-goal, or possibly something fancier could be done, like pushing the code block out into the Library of Babel, and adding a grep call to the shell script to remove the #+call line from the file before passing it to wc. Best -- Eric --8<---------------cut here---------------start------------->8--- * return % num-words/word-goal Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enimad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. #+results: word-goal : 200 #+begin_src sh :var file=(buffer-file-name) :var goal=word-goal echo "`wc $file |awk '{print $2}'`00 / $goal"|bc #+end_src #+results: : 47 --8<---------------cut here---------------end--------------->8--- writes: > Hey guys, > > is it possible to to define a number of words and have a > checklist-type progress-monitor (/ or %) tell you how close > you are to reaching the number? > > Just curious--it would come in handy...