emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Getting heading properties from org-element


From: Nicolas Goaziou
Subject: Re: [O] Getting heading properties from org-element
Date: Mon, 06 Jul 2015 17:36:15 +0200

Hello,

John Kitchin <address@hidden> writes:

> hm. We must have different use cases in mind. Currently I am using
>
> (save-excursion
>                       (goto-char
>                        (org-element-property :begin headline))
>                       (org-entry-properties))
>
> to get the properties. I thought there would be a way to get those from
> the parse tree to avoid the excursion (I use this to index a few
> thousand org-files so I want it to be fast).

If you have the full parse tree and you're only interested in local
properties (i.e., neither CATEGORY or special properties):

  (org-element-map headline 'node-property
    (lambda (p)
      (cons (org-element-property :key p)
            (org-element-property :value p))))


Regards,

-- 
Nicolas Goaziou



reply via email to

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