From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xebar Saram Subject: Re: function to duplicate current header and change ID Date: Thu, 11 Aug 2016 14:22:31 +0300 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113a18525f86470539c9fb13 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57970) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXo4I-0002rH-TT for emacs-orgmode@gnu.org; Thu, 11 Aug 2016 07:22:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bXo4H-0005uA-0r for emacs-orgmode@gnu.org; Thu, 11 Aug 2016 07:22:33 -0400 Received: from mail-yb0-x229.google.com ([2607:f8b0:4002:c09::229]:36240) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXo4G-0005tv-SH for emacs-orgmode@gnu.org; Thu, 11 Aug 2016 07:22:32 -0400 Received: by mail-yb0-x229.google.com with SMTP id v8so172315ybe.3 for ; Thu, 11 Aug 2016 04:22:32 -0700 (PDT) In-Reply-To: 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: org mode --001a113a18525f86470539c9fb13 Content-Type: text/plain; charset=UTF-8 ok so i have this so far (defun zxx () "duplicate and change id of org header" (interactive) (org-copy-subtree) (org-end-of-line) (newline) ;(org-yank) (org-paste-subtree) (org-forward-heading-same-level 1) (let ((current-prefix-arg '(4))) (call-interactively #'org-id-get-create)) ) yet it seems very bloated since i cant code ;-) and dosent work as it dosent really creates a new org-id. any tips? best Z On Wed, Aug 3, 2016 at 7:17 AM, Xebar Saram wrote: > 1. copy current header and contents (org-copy-subtree) at point > 2. auto paste it below current header > 3. change ID > --001a113a18525f86470539c9fb13 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
ok so i have this so far
<= div class=3D"gmail_extra">

(defun zxx =C2=A0()
=C2=A0 "duplicate and change id of org = header"
(interactive)
(org-copy-subtree)
(org-en= d-of-line)=C2=A0
(newline)
;(org-yank)
(org-paste-sub= tree)
(org-forward-heading-same-level 1) = =C2=A0
(let ((current-prefix-arg '(4)))= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0
(call-interactively #'org-id-get-create))
)


yet it seems very bloate= d since i cant code ;-) and dosent work as it dosent really creates a new o= rg-id. any tips?

best

Z

<= br>
On Wed, Aug 3, 2016 at 7:17 AM, Xebar Saram <= span dir=3D"ltr"><zeltakc@gmail.com> wrote:
1. copy current header and contents (org-copy-subtr= ee) at point
2. auto paste it below current header
3. c= hange ID=C2=A0


--001a113a18525f86470539c9fb13--