From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: FR: count headlines at a level in a region Date: Mon, 12 Nov 2007 06:36:45 +0000 Message-ID: <87zlxk55s2.fsf@bzg.ath.cx> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IrRyc-0006no-EM for emacs-orgmode@gnu.org; Mon, 12 Nov 2007 00:36:50 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IrRya-0006jw-Hc for emacs-orgmode@gnu.org; Mon, 12 Nov 2007 00:36:49 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IrRya-0006jh-De for emacs-orgmode@gnu.org; Mon, 12 Nov 2007 00:36:48 -0500 Received: from ug-out-1314.google.com ([66.249.92.175]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IrRyZ-00085u-Vw for emacs-orgmode@gnu.org; Mon, 12 Nov 2007 00:36:48 -0500 Received: by ug-out-1314.google.com with SMTP id a2so731545ugf for ; Sun, 11 Nov 2007 21:36:45 -0800 (PST) In-Reply-To: (Austin Frank's message of "Sun, 11 Nov 2007 19:31:05 -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: emacs-orgmode@gnu.org Austin Frank writes: > Would it be possible to add a command that does counts the number of > headlines at a particular level in a region or a buffer? May I ask why do you need this? Knowing about the context of use for such a function would help figure out how to write it. If you just need to know the number of headlines occasionnally, then: C-c C-x b will open an indirect buffer M-x occur "^\*+ " will find all headlines But I guess you need to re-use the output of such a function somehow. -- Bastien