From mboxrd@z Thu Jan 1 00:00:00 1970 From: 42 147 Subject: Re: viewing number of nested headlines Date: Tue, 5 Feb 2013 17:07:09 -0500 Message-ID: References: <87y5f3vycq.fsf@bzg.ath.cx> <87zjziv5gs.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=f46d0434bf0c55ec4604d5016eb8 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:49539) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U2qfY-0005D0-LR for emacs-orgmode@gnu.org; Tue, 05 Feb 2013 17:07:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U2qfW-0001GK-R2 for emacs-orgmode@gnu.org; Tue, 05 Feb 2013 17:07:12 -0500 Received: from mail-ve0-f182.google.com ([209.85.128.182]:48586) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U2qfW-0001GD-LW for emacs-orgmode@gnu.org; Tue, 05 Feb 2013 17:07:10 -0500 Received: by mail-ve0-f182.google.com with SMTP id ox1so594809veb.27 for ; Tue, 05 Feb 2013 14:07:09 -0800 (PST) In-Reply-To: <87zjziv5gs.fsf@bzg.ath.cx> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bastien Cc: Org Mode --f46d0434bf0c55ec4604d5016eb8 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable > Hi 42 (what's your other name?) John is my real first name. . . . As for the rest, I didn't see some of the other replies, because the org-mode mailing list moves a little two fast for my mailbox, and I prefer to read selectively from the gmane archive. That said, it is my responsibility to check that website before responding to (some) of the messages that get forwarded to my e-mail address in a thread I started. Anyway, checking out some of the other solutions, since many were provided. Thanks for the technical background on how headlines work in the code. 2013/2/5 Bastien > Hi 42 (what's your other name?) > > 42 147 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=E7ois' 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 > --f46d0434bf0c55ec4604d5016eb8 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable > Hi 42 (what's your other name?)

John is my real first name.=

. . .

As for the rest, I didn't see some of the other re= plies, because the
org-mode mailing list moves a little two fast for my = mailbox, and I prefer
to read selectively from the gmane archive.

That said, it is my resp= onsibility to check that website before responding
to (some) of the mess= ages that get forwarded to my e-mail address in a
thread I started.

Anyway, checking out some of the other solutions, since many were provi= ded.
Thanks for the technical background on how headlines work in the co= de.

2013/2/5 Bastien &l= t;bzg@altern.org>= ;
Hi 42 (what's your other name?)

42 147 <aeuster@gmail.com> w= rites:

> 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. =A0Long story short: folding a headline works by adding a<= br> text overlay with the invisible property, and finding the end of the
overlay works by finding another headline of the same level. =A0So 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=E7ois' 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. =A0But 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,

--
=A0Bastien

--f46d0434bf0c55ec4604d5016eb8--