0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-08-27 06:32:53 +00:00

Remove ID property in clone template

This commit is contained in:
David Maus 2010-05-14 21:24:57 +02:00 committed by Carsten Dominik
parent 5e264e35c5
commit d090a9d858
2 changed files with 19 additions and 8 deletions

View file

@ -1,3 +1,8 @@
2010-05-14 David Maus <dmaus@ictsoc.de>
* org.el (org-clone-subtree-with-time-shift): Remove ID
property of original subtree in cloned subtrees.
2010-05-14 Carsten Dominik <carsten.dominik@gmail.com>
* org-exp.el (org-export-format-source-code-or-example):

View file

@ -7097,14 +7097,15 @@ If yes, remember the marker and the distance to BEG."
"Clone the task (subtree) at point N times.
The clones will be inserted as siblings.
In interactive use, the user will be prompted for the number of clones
to be produced, and for a time SHIFT, which may be a repeater as used
in time stamps, for example `+3d'.
In interactive use, the user will be prompted for the number of
clones to be produced, and for a time SHIFT, which may be a
repeater as used in time stamps, for example `+3d'.
When a valid repeater is given and the entry contains any time stamps,
the clones will become a sequence in time, with time stamps in the
subtree shifted for each clone produced. If SHIFT is nil or the
empty string, time stamps will be left alone.
When a valid repeater is given and the entry contains any time
stamps, the clones will become a sequence in time, with time
stamps in the subtree shifted for each clone produced. If SHIFT
is nil or the empty string, time stamps will be left alone. The
ID property of the original subtree is removed.
If the original subtree did contain time stamps with a repeater,
the following will happen:
@ -7138,7 +7139,12 @@ and still retain the repeater to cover future instances of the task."
(org-end-of-subtree t t)
(or (bolp) (insert "\n"))
(setq end (point))
(setq template (buffer-substring beg end))
(setq template (let ((tmpl (buffer-substring beg end)))
(with-temp-buffer
(insert tmpl)
(org-mode)
(org-entry-delete nil "ID")
(buffer-string))))
(when (and doshift
(string-match "<[^<>\n]+ \\+[0-9]+[dwmy][^<>\n]*>" template))
(delete-region beg end)