emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Austin Frank <austin.frank@gmail.com>
To: emacs-orgmode@gnu.org
Subject: FR:  count headlines at a level in a region
Date: Sun, 11 Nov 2007 19:31:05 -0500	[thread overview]
Message-ID: <m0abpkl2ye.fsf@gmail.com> (raw)

[-- Attachment #1.1: Type: text/plain, Size: 1147 bytes --]


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

 | 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!
Austin Frank
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc

[-- Attachment #1.2: Type: application/pgp-signature, Size: 185 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.

             reply	other threads:[~2007-11-12  0:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-12  0:31 Austin Frank [this message]
2007-11-12  6:36 ` FR: count headlines at a level in a region Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m0abpkl2ye.fsf@gmail.com \
    --to=austin.frank@gmail.com \
    --cc=emacs-orgmode@gnu.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).