From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Can `org-element-map' act on secondary-strings? Date: Mon, 08 Jul 2013 09:39:32 +0200 Message-ID: <87wqp1ec0b.fsf@gmail.com> References: <87li5jrbx3.fsf@gmail.com> <871u7bfw4x.fsf@gmail.com> <87obada5ck.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51281) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uw62d-0002Ql-Jr for emacs-orgmode@gnu.org; Mon, 08 Jul 2013 03:39:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uw62c-00012G-Cm for emacs-orgmode@gnu.org; Mon, 08 Jul 2013 03:39:23 -0400 Received: from mail-wi0-x22f.google.com ([2a00:1450:400c:c05::22f]:63659) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uw62c-000127-6o for emacs-orgmode@gnu.org; Mon, 08 Jul 2013 03:39:22 -0400 Received: by mail-wi0-f175.google.com with SMTP id m6so8706270wiv.14 for ; Mon, 08 Jul 2013 00:39:20 -0700 (PDT) In-Reply-To: <87obada5ck.fsf@gmail.com> (Thorsten Jolitz's message of "Mon, 08 Jul 2013 09:16:59 +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: > I meant these strings that I find in parse-trees that apparently do have a > parent-proptery: > > #+begin_src emacs-lisp > (headline ... :title (#("topic number one" 0 16 (:parent #1)))) > > (paragraph (:begin 114 ...) > #("Hello subtopic number one " 0 26 (:parent #4))) > #+end_src All strings contained in an element or a secondary string have a parent property. Try (org-element-map (org-element-parse-buffer) 'plain-text 'identity) on the following Org buffer #+begin_src org * A B #+end_src > I concluded that they are the secondary values listed here: No. The secondary values are lists: "topic number one", which has a :parent property, belongs to a list stored in :title property. That list is the secondary value. > I can change the :parent attribute of the headline containing the above > :title string (or of the paragraph containing the above content string) > with `org-element-map', but those :parent references inside the strings > remain untouched. Why would they be changed? The :parent reference in the headline is another headline, or the full tree whereas the :parent reference in these strings is the headline itself. IOW, they are unrelated. > I can access them by writing some code, of course, I only wanted to know if > `org-element-map' might be able to access them out-of-the-box somehow. As said in my previous post, `org-element-map' can access them. Do you have a simple example showing what you want to achieve? Regards, -- Nicolas Goaziou