From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thorsten Jolitz Subject: Re: How to find the headline matching a string Date: Wed, 04 Jun 2014 13:27:21 +0200 Message-ID: <87egz4ykx2.fsf@gmail.com> References: <87bnuedl38.fsf@ericabrahamsen.net> <87ha45r9hi.fsf@gmail.com> <874n05e0ls.fsf@ericabrahamsen.net> <87r436mkgb.fsf@gmail.com> <877g4y723u.fsf@ericabrahamsen.net> <87ioohpww8.fsf@gmail.com> <87d2ep5ubs.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58159) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ws9M8-0007X1-Pm for emacs-orgmode@gnu.org; Wed, 04 Jun 2014 07:27:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ws9M1-0000Kr-Db for emacs-orgmode@gnu.org; Wed, 04 Jun 2014 07:27:44 -0400 Received: from plane.gmane.org ([80.91.229.3]:55862) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ws9M1-0000KJ-6v for emacs-orgmode@gnu.org; Wed, 04 Jun 2014 07:27:37 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Ws9M0-0003Lh-4O for emacs-orgmode@gnu.org; Wed, 04 Jun 2014 13:27:36 +0200 Received: from e178060102.adsl.alicedsl.de ([85.178.60.102]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 04 Jun 2014 13:27:36 +0200 Received: from tjolitz by e178060102.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 04 Jun 2014 13:27:36 +0200 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: emacs-orgmode@gnu.org Eric Abrahamsen writes: > Nicolas Goaziou writes: > >> Hello, >> >> Eric Abrahamsen 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. Yes, thanks for the feedback, org-map-entries is very useful and powerful but I wasn't sure if its still a "first-class member" of Org-mode or already a bit deprecated. Nice to hear that it is going to stay. -- cheers, Thorsten