Org element insert before would insert the new element before the selected element, not as the first element child (I think) At the moment I'm finding the first child, checking if it is non nil, and if it is not nil, dolist insert before the first child, else, adopt the elements. Which is a fairly convoluted way On Sun, Sep 2, 2018, 8:27 AM Nicolas Goaziou wrote: > Hello, > > Ivan Tadeu Ferreira Antunes Filho 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 > _______________________________________________ > Ita mailing list > Ita@mit.edu > http://mailman.mit.edu/mailman/listinfo/ita >