From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Bug: [patch] also tangle headlines that begin with lower case string "comment" [8.2.5h (release_8.2.5h-680-g12df70 @ /home/youngfrog/sources/org-mode/lisp/)] Date: Wed, 05 Mar 2014 23:27:35 +0100 Message-ID: <878usojn6w.fsf@gmail.com> References: <87zjl4wsz7.fsf@yahoo.fr> <87ha7cjwdx.fsf@gmail.com> <87a9d42tsw.fsf@yahoo.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47728) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WLKHW-0000sN-1G for emacs-orgmode@gnu.org; Wed, 05 Mar 2014 17:27:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WLKHQ-0008GP-RY for emacs-orgmode@gnu.org; Wed, 05 Mar 2014 17:27:17 -0500 Received: from mail-wg0-x22e.google.com ([2a00:1450:400c:c00::22e]:47395) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WLKHQ-0008GL-Kf for emacs-orgmode@gnu.org; Wed, 05 Mar 2014 17:27:12 -0500 Received: by mail-wg0-f46.google.com with SMTP id z12so2108109wgg.29 for ; Wed, 05 Mar 2014 14:27:11 -0800 (PST) In-Reply-To: <87a9d42tsw.fsf@yahoo.fr> (Nicolas Richard's message of "Wed, 05 Mar 2014 22:56:47 +0100") 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: Nicolas Richard Cc: emacs-orgmode@gnu.org Nicolas Richard writes: > I don't know if speed is terribly important here, but since my suggested > approach uses a loop instead of recursion, it ends up being faster for > nested headlines (more than 5 levels). This obviously could be fixed in > the initial approach too. > > Since we know where point is, we could also use > (org-element-headline-parser nil t) instead of (org-element-at-point). > That's a tiny bit faster. `org-element-headline-parser' is a bit low-level. Also, it will still retrieve all entry properties, which explains why regexps are faster. Anyway, it doesn't matter much if speed is not an issue. Regards, -- Nicolas Goaziou