emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] How to find the headline matching a string


From: Eric Abrahamsen
Subject: Re: [O] How to find the headline matching a string
Date: Wed, 04 Jun 2014 09:36:55 +0800
User-agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.4.50 (gnu/linux)

Nicolas Goaziou <address@hidden> writes:

> Hello,
>
> Eric Abrahamsen <address@hidden> writes:
>
>> I guess it shouldn't be too surprising -- the org element stuff is
>> completely parsing the entire buffer on every pass. The other function
>> probably boils down to passing a few targeted regexps over the buffer.
>> I've sneakily cc'd Nicolas to see what he thinks. My guess is we could
>> replace the call to org-element-parse-buffer with something that
>> creates/accesses the cached version of the parse tree, and things would
>> go much more swiftly.
>
> I didn't look closely into the issue, but I think the main reason is
> that Element parses headlines thoroughly, including all properties,
> scheduled keywords, which is not, by default, the case for
> `org-map-entries'.
>
> For most use-cases, you don't need the parser for headlines, as their
> grammar is context free. IOW, `org-element-parse-buffer' doesn't predate
> `org-map-entries'.

Interesting, thanks! I think at first we were unsure if org-map-entries
was going to stay around in the long term, but it sounds like it's not
going anywhere.

E




reply via email to

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