Re: [O] Can `org-element-map' act on secondary-strings?

2013-07-08 Thread Thorsten Jolitz
Nicolas Goaziou n.goaz...@gmail.com writes: Hello, Thorsten Jolitz tjol...@gmail.com 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

Re: [O] Can `org-element-map' act on secondary-strings?

2013-07-08 Thread Nicolas Goaziou
Hello, Thorsten Jolitz tjol...@gmail.com 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

Re: [O] Can `org-element-map' act on secondary-strings?

2013-07-08 Thread Thorsten Jolitz
Nicolas Goaziou n.goaz...@gmail.com writes: Hello, 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) Do you have a simple example showing what you want to achieve? Thanks, the

Re: [O] Can `org-element-map' act on secondary-strings?

2013-07-08 Thread Nicolas Goaziou
Thorsten Jolitz tjol...@gmail.com writes: Nicolas Goaziou n.goaz...@gmail.com writes: Thanks, the 'plain-text type was what I missed. I used #+begin_src emacs-lisp (append '(org-data) org-element-all-elements org-element-all-objects) #+end_src as types for

Re: [O] Can `org-element-map' act on secondary-strings?

2013-07-08 Thread Thorsten Jolitz
Nicolas Goaziou n.goaz...@gmail.com writes: You don't need `org-data' type. The tree root doesn't have any property anyway. I used that because I wanted the whole parse-tree as return value, but no matter what `org-element-map' returns, it changes the parse-tree by side-effects anyway, so I

Re: [O] Can `org-element-map' act on secondary-strings?

2013-07-08 Thread Jambunathan K
Thorsten Jolitz tjol...@gmail.com writes: Nicolas Goaziou n.goaz...@gmail.com writes: You don't need `org-data' type. The tree root doesn't have any property anyway. I used that because I wanted the whole parse-tree as return value, but no matter what `org-element-map' returns, it changes

Re: [O] Can `org-element-map' act on secondary-strings?

2013-07-08 Thread Thorsten Jolitz
Jambunathan K kjambunat...@gmail.com writes: Thorsten Jolitz tjol...@gmail.com writes: Nicolas Goaziou n.goaz...@gmail.com writes: You don't need `org-data' type. The tree root doesn't have any property anyway. I used that because I wanted the whole parse-tree as return value, but no

[O] Can `org-element-map' act on secondary-strings?

2013-07-06 Thread Thorsten Jolitz
Hi List, 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

Re: [O] Can `org-element-map' act on secondary-strings?

2013-07-06 Thread Nicolas Goaziou
Hello, Thorsten Jolitz tjol...@gmail.com 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