Hi 42 (what's your other name?)
42 147 <
address@hidden> writes:
> Maybe you could point me in the right direction; somewhere in the
> code, org-mode must be aware of the number of nested headlines in
> order for show-branches and show-children to work. Or maybe it is
> not.
It is not. Long story short: folding a headline works by adding a
text overlay with the invisible property, and finding the end of the
overlay works by finding another headline of the same level. So there
is no nothing of "jumping" by N subtrees.
Still, you can fetch the number of invisible headline in a folded
subtree *afterwards* -- I assumed this is what François' code does.
> In any case, I'd try and adapt the code to display a number
> indicating (1) position in the hierarchy; and (2) number of
> headlines at that / those position(s).
This could end up in a minor mode or simply a feature that people
could turn on and off. But beware of the efficiency: with many
headlines, the folding features of Org combined with this feature
could become quite slow.
> Apologies if the original message was poorly articulated.
No problem, that's part of the game.
Thanks,
--
Bastien