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: John Kitchin
Subject: Re: [O] Getting heading properties from org-element
Date: Mon, 06 Jul 2015 12:03:20 -0400

beautiful! Thanks!

Nicolas Goaziou writes:

> 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,

--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu



reply via email to

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