Hello, Vitalie Spinu <spinu...@gmail.com> 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