Re: [O] function to duplicate current header and change ID

2016-08-17 Thread Jorge
On 11 August 2016 at 12:33, John Kitchin wrote: > Does this do what you want? Could not he just use C-u C-c C-x c (org-clone-subtree-with-time-shift)?

Re: [O] function to duplicate current header and change ID

2016-08-11 Thread Xebar Saram
thats perfect John thx so much...its amazing how far my "code" was ..another example how much i suck at anything resembling coding ;-) best Z

Re: [O] function to duplicate current header and change ID

2016-08-11 Thread John Kitchin
Does this do what you want? (defun clone-subtree () "Clone the current subtree and change the id." (interactive) (when (not (looking-at "^\\*")) (re-search-backward "^\\*")) (org-copy-subtree) (goto-char (org-element-property :end (org-element-context))) (org-paste-subtree)

Re: [O] function to duplicate current header and change ID

2016-08-11 Thread Xebar Saram
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

[O] function to duplicate current header and change ID

2016-08-02 Thread Xebar Saram
Hi all i noticed i use the copy and then paste entire headers (with content) quite often. the problem i also notice is that creates alot of issues with duplicate IDS. I wonder if anyone has a function he would like to share or can help me create a function that will 1. copy current header and