From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ivan Tadeu Ferreira Antunes Filho Subject: org-element-adopt-elements, append before children Date: Sun, 2 Sep 2018 02:52:08 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000b709e40574dddd0a" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56315) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fwMFI-00018I-HP for emacs-orgmode@gnu.org; Sun, 02 Sep 2018 02:52:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fwMFE-00031A-Gj for emacs-orgmode@gnu.org; Sun, 02 Sep 2018 02:52:28 -0400 Received: from mail-lj1-f172.google.com ([209.85.208.172]:35701) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fwMFD-0002wb-Mx for emacs-orgmode@gnu.org; Sun, 02 Sep 2018 02:52:24 -0400 Received: by mail-lj1-f172.google.com with SMTP id p10-v6so13045342ljg.2 for ; Sat, 01 Sep 2018 23:52:21 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org --000000000000b709e40574dddd0a Content-Type: text/plain; charset="UTF-8" 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? --000000000000b709e40574dddd0a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
At the moment=C2=A0 org-element-adopt-elements a= lways appends the new elements after the elements original children.=C2=A0 = In many cases one might want to append before the original children.
<= div dir=3D"ltr">
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
=
=C2=A0 (nconc children (org-element-contents parent))=C2=A0
=
=C2=A0 (nconc (org-element-contents parent) children))
=
Would this be okay?

--000000000000b709e40574dddd0a--