--- lisp/ChangeLog | 2 ++ lisp/org.el | 7 +++++++ 2 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ba65761..7c743a1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -7,6 +7,8 @@ (org-clone-delete-id): New customization variable. (org-clone-subtree-with-time-shift): Use customization variable `org-clone-delete-id'. + (org-clone-subtree-with-time-shift): Remove empty property + drawer in cloned subtrees. 2010-05-17 Carsten Dominik <carsten.domi...@gmail.com> diff --git a/lisp/org.el b/lisp/org.el index 88d636d..db0f5e2 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -7215,6 +7215,10 @@ and still retain the repeater to cover future instances of the task." (if org-clone-delete-id (org-entry-delete nil "ID") (org-id-get-create t)) + (while (re-search-forward + org-property-drawer-re nil t) + (org-remove-empty-drawer-at + "PROPERTIES" (point))) (buffer-string)))) (with-temp-buffer (insert template) @@ -7223,6 +7227,9 @@ and still retain the repeater to cover future instances of the task." (and idprop (if org-clone-delete-id (org-entry-delete nil "ID") (org-id-get-create t))) + (while (re-search-forward org-property-drawer-re nil t) + (org-remove-empty-drawer-at "PROPERTIES" (point))) + (goto-char (point-min)) (while (re-search-forward org-ts-regexp-both nil t) (org-timestamp-change (* n shift-n) shift-what)) (unless (= n n-no-remove) -- 1.7.1 _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode