From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Getting heading properties from org-element Date: Mon, 06 Jul 2015 17:36:15 +0200 Message-ID: <87egklti1c.fsf@nicolasgoaziou.fr> References: <87mvzact6f.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51270) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZC8Q2-0003KR-Ss for emacs-orgmode@gnu.org; Mon, 06 Jul 2015 11:34:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZC8Pz-00036A-NH for emacs-orgmode@gnu.org; Mon, 06 Jul 2015 11:34:54 -0400 Received: from relay5-d.mail.gandi.net ([2001:4b98:c:538::197]:59729) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZC8Pz-0002mP-9W for emacs-orgmode@gnu.org; Mon, 06 Jul 2015 11:34:51 -0400 In-Reply-To: (John Kitchin's message of "Mon, 06 Jul 2015 11:23:49 -0400") 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: John Kitchin Cc: emacs-orgmode@gnu.org, Thorsten Jolitz Hello, John Kitchin 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