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: Nicolas Goaziou
Subject: Re: [O] How to find the headline matching a string
Date: Tue, 03 Jun 2014 22:21:11 +0200

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'.


Regards,

-- 
Nicolas Goaziou



reply via email to

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