From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Can `org-element-map' act on secondary-strings? Date: Sat, 06 Jul 2013 19:14:54 +0200 Message-ID: <871u7bfw4x.fsf@gmail.com> References: <87li5jrbx3.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43939) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UvW4K-0000Ka-45 for emacs-orgmode@gnu.org; Sat, 06 Jul 2013 13:14:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UvW4H-00078Z-RI for emacs-orgmode@gnu.org; Sat, 06 Jul 2013 13:14:44 -0400 Received: from mail-we0-x22b.google.com ([2a00:1450:400c:c03::22b]:34772) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UvW4H-000786-KA for emacs-orgmode@gnu.org; Sat, 06 Jul 2013 13:14:41 -0400 Received: by mail-we0-f171.google.com with SMTP id m46so2708050wev.30 for ; Sat, 06 Jul 2013 10:14:41 -0700 (PDT) In-Reply-To: <87li5jrbx3.fsf@gmail.com> (Thorsten Jolitz's message of "Sat, 06 Jul 2013 16:38:32 +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: Thorsten Jolitz Cc: emacs-orgmode@gnu.org Hello, Thorsten Jolitz writes: > when parsing an Org file with org-element-parse-buffer, headline titles > and section contents (e.g.) end up as secondary strings in the > parse-tree that do have a ':parent' attribute. > > When I try to modify all :parent attributes inside a parse-tree with > `org-element-map' (by mapping over all element and object types), the > secondary strings in the parse-tree remain untouched. > > Is there a way to make `org-element-map' act on these secondary strings > too? I'm not sure to understand your question. "Secondary string" is not an object type, so you cannot explicitly search for them in a parse tree. Also, secondary strings do not have a :parent property (or any property whatsoever: they are just lists). Though, if you map over objects, e.g., bold text, `org-element-map' will also look for them within secondary lists. HTH, -- Nicolas Goaziou