emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bastien <bzg@altern.org>
To: 42 147 <aeuster@gmail.com>
Cc: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: viewing number of nested headlines
Date: Tue, 05 Feb 2013 22:03:15 +0100	[thread overview]
Message-ID: <87zjziv5gs.fsf@bzg.ath.cx> (raw)
In-Reply-To: <CAMgvimEj0LXADTWat5gS2HksTpCKZa-rHipB=23t2MW+WqPLQg@mail.gmail.com> (42's message of "Tue, 5 Feb 2013 15:17:17 -0500")

Hi 42 (what's your other name?)

42 147 <aeuster@gmail.com> 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

  reply	other threads:[~2013-02-05 21:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-04 23:59 viewing number of nested headlines 42 147
2013-02-05 10:39 ` Bastien
2013-02-05 12:43   ` François Pinard
2013-02-05 18:34     ` Samuel Wales
2013-02-05 13:25   ` Sebastien Vauban
2013-02-05 14:08     ` François Pinard
2013-02-05 20:17   ` 42 147
2013-02-05 21:03     ` Bastien [this message]
2013-02-05 22:07       ` 42 147
2013-02-06 20:50         ` Achim Gratz

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=87zjziv5gs.fsf@bzg.ath.cx \
    --to=bzg@altern.org \
    --cc=aeuster@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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).