emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] FR: count headlines at a level in a region


From: Austin Frank
Subject: [Orgmode] FR: count headlines at a level in a region
Date: Sun, 11 Nov 2007 19:31:05 -0500
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1 (darwin)

Hello!

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?

By default the command would count all of the headlines in the buffer or
the region, depending on the selection.  It would also be useful if
prefix arguments restricted the count to headlines at a certain level.

Given the following structure:

 * h1 1
 ** h2 1
 ** h2 2

 * h1 2
 ** h2 3

I would hope for the following behavior from
org-count-headlines-at-level:

 | buffer status          | command         | output      |
 |------------------------+-----------------+-------------|
 | no selection           | no prefix arg   | 5 headlines |
 | no selection           | prefix arg of 1 | 2 headlines |
 | no selection           | prefix arg of 2 | 3 headlines |
 | select the "h1 1" tree | no prefix arg   | 3 headlines |
 | select the "h1 1" tree | prefix arg of 1 | 1 headline  |
 | select the "h1 1" tree | prefix arg of 2 | 2 headlines |

Thanks for considering it!
/au
 
-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc

Attachment: pgpnjjYaz_Ldb.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]