[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] org-element-adopt-elements, append before children
From: |
Nicolas Goaziou |
Subject: |
Re: [O] org-element-adopt-elements, append before children |
Date: |
Sun, 02 Sep 2018 14:27:46 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
Hello,
Ivan Tadeu Ferreira Antunes Filho <address@hidden> writes:
> At the moment org-element-adopt-elements always appends the new elements
> after the elements original children. In many cases one might want to
> append before the original children.
>
> I want to propose adding an argument to org-element-adopt-elements that
> defines if the elements should be added before or after the children, i.e.
> (if append-before
> (nconc children (org-element-contents parent))
> (nconc (org-element-contents parent) children))
>
> Would this be okay?
You can simply use `org-element-insert-before'.
Regards,
--
Nicolas Goaziou