emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Two functions for efficient headline navigation


From: Nicolas Goaziou
Subject: Re: [O] Two functions for efficient headline navigation
Date: Mon, 22 Feb 2016 09:39:06 +0100

Hello,

Christoph LANGE <address@hidden> writes:

> Related to these functions I have a comment on Org's design.
> org-jump-to-child (prompts for the title of a sub-heading of the current
> heading and navigates there) was fairly complex to implement.  Coming
> from an XML background I was surprised to see that Org has no notion of
> a data model or of the semantics of a document and its tree, but that I
> was basically required to implement an algorithm to walk through all
> sub-headings and collect them.  Has an implementation based on a data
> model ever been considered?

See

  (org-with-wide-buffer
   (org-narrow-to-subtree)
   (org-element-parse-buffer 'headline))

and

  `org-element-map'

Also, `org-map-entries' could do the job, with a `tree' SCOPE and an
appropriate MATCH (e.g. "LEVEL>N" where N is the current level).

Regards,

-- 
Nicolas Goaziou



reply via email to

[Prev in Thread] Current Thread [Next in Thread]