emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Matt Lundin <mdl@imapmail.org>
To: Xebar Saram <zeltakc@gmail.com>
Cc: org mode <emacs-orgmode@gnu.org>
Subject: Re: show number of sub headers in top level header (alternative to statistics cookie?)
Date: Wed, 12 Aug 2015 17:15:28 -0500	[thread overview]
Message-ID: <87h9o48873.fsf@fastmail.fm> (raw)
In-Reply-To: <CAOQHXPr7hsA-xzxHOj64_5bQ+Ru473wjhRZ75nr6yGzT4M+Msg@mail.gmail.com> (Xebar Saram's message of "Fri, 7 Aug 2015 11:09:23 +0300")

Xebar Saram <zeltakc@gmail.com> writes:

> I was wondering if there was an option in org to show number of sub
> headers in top level header. i know there is statistics cookies but
> that's not automatic?

There are a few ways one could use statistic cookies to make this more
"automatic."

The first is to set:

(setq org-provide-todo-statistics 'all-headlines)

Also make sure that org-hierarchical-todo-statistics is set to t (the
default).

This will make sure that the statistics cookie counts all entries, not
just todo keywords, so the second number in a cookie [3/18] will be the
total number of subheadings.

Org-mode already automatically updates cookies when changing a todo. But
you could also update the cookies when changing a headline to ensure an
up-to-date count:

(add-hook 'org-insert-heading-hook 'org-update-parent-todo-statistics)

Hope this helps,
Matt

      parent reply	other threads:[~2015-08-12 22:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-07  8:09 show number of sub headers in top level header (alternative to statistics cookie?) Xebar Saram
2015-08-07 13:49 ` John Kitchin
2015-08-12 22:15 ` Matt Lundin [this message]

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  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=87h9o48873.fsf@fastmail.fm \
    --to=mdl@imapmail.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=zeltakc@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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).