[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] org-export: how to copy the parsed tree?
From: |
Nicolas Goaziou |
Subject: |
Re: [O] org-export: how to copy the parsed tree? |
Date: |
Sun, 02 Mar 2014 10:13:43 +0100 |
Hello,
Vitalie Spinu <address@hidden> writes:
> Is there an idiomatic way to do this? Like constructors of org elements?
> Or, one just starts with an empty '(headline) list
You can even start with '(org-data nil).
> and populate it with org-element-set-contents and
> org-element-put-property?
I would use `org-element-adopt-elements' instead
`org-element-set-contents', which is too low level. The former will take
care of setting the appropriate :parent property.
You can probably extract headlines with `org-element-extract-element',
duplicate them as many times as you want, and insert them back with
`org-element-adopt-elements'. This is just a rough idea; I don't have
any algorithm to offer.
Regards,
--
Nicolas Goaziou