From: John Kitchin <jkitchin@andrew.cmu.edu>
To: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Cc: Thorsten Jolitz <tjolitz@gmail.com>, emacs-orgmode@gnu.org
Subject: Re: Getting heading properties from org-element
Date: Mon, 06 Jul 2015 12:03:20 -0400 [thread overview]
Message-ID: <m2egklff3r.fsf@andrew.cmu.edu> (raw)
In-Reply-To: <87egklti1c.fsf@nicolasgoaziou.fr>
beautiful! Thanks!
Nicolas Goaziou writes:
> Hello,
>
> John Kitchin <jkitchin@andrew.cmu.edu> 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
prev parent reply other threads:[~2015-07-06 16:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-05 17:33 Getting heading properties from org-element John Kitchin
2015-07-05 19:15 ` Thorsten Jolitz
2015-07-06 15:23 ` John Kitchin
2015-07-06 15:36 ` Nicolas Goaziou
2015-07-06 16:03 ` John Kitchin [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2egklff3r.fsf@andrew.cmu.edu \
--to=jkitchin@andrew.cmu.edu \
--cc=emacs-orgmode@gnu.org \
--cc=mail@nicolasgoaziou.fr \
--cc=tjolitz@gmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.