Orgmode: Show number of children under heading

 ̄綄美尐妖づ 提交于 2019-12-05 08:06:03

What's most similar to what you're searching are called statistics cookies. They're described at the end of this page in the manual. At first meant for lists, but that can also count headlines. Just put [/] at the end of your header, like so :

* Main header [/]
** sub-header 1
** sub-header 2
** sub-header 3

And press C-c C-c on the cookie to update it (make it update its count). What you do need to add to what you describe to be your use-case is TODO keywords to your headers, because what the cookie will count is how many are done over how many are to do. Therefore I suggest you mark them all as DONE, like so :

* Main header [3/3]
** DONE sub-header 1
** DONE sub-header 2
** DONE sub-header 3

Then, the counter will show you what you want.

You could probably adapt these cookies' code to meet your precise needs.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!