emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-element-adopt-elements, append before children
@ 2018-09-02  6:52 Ivan Tadeu Ferreira Antunes Filho
  2018-09-02 12:27 ` Nicolas Goaziou
  0 siblings, 1 reply; 4+ messages in thread
From: Ivan Tadeu Ferreira Antunes Filho @ 2018-09-02  6:52 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 468 bytes --]

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?

[-- Attachment #2: Type: text/html, Size: 726 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-09-03  8:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-02  6:52 org-element-adopt-elements, append before children Ivan Tadeu Ferreira Antunes Filho
2018-09-02 12:27 ` Nicolas Goaziou
2018-09-02 20:48   ` Ivan Tadeu Ferreira Antunes Filho
2018-09-03  8:04     ` Nicolas Goaziou

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).