From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: [PATCH 2/3] Provide customization variable `org-clone-delete-id'. Date: Wed, 19 May 2010 23:35:20 +0200 Message-ID: References: <1274295207-4961-1-git-send-email-dmaus@ictsoc.de> <1274295207-4961-2-git-send-email-dmaus@ictsoc.de> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=54021 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OErAW-0000D7-T7 for emacs-orgmode@gnu.org; Wed, 19 May 2010 17:51:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OEqvE-0000aN-Lh for emacs-orgmode@gnu.org; Wed, 19 May 2010 17:35:26 -0400 Received: from mail-ew0-f216.google.com ([209.85.219.216]:55687) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OEqvE-0000a9-3r for emacs-orgmode@gnu.org; Wed, 19 May 2010 17:35:24 -0400 Received: by ewy8 with SMTP id 8so2241458ewy.8 for ; Wed, 19 May 2010 14:35:23 -0700 (PDT) In-Reply-To: <1274295207-4961-2-git-send-email-dmaus@ictsoc.de> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: David Maus Cc: emacs-orgmode Mode Hi David, do you have these patches on a branch? Thanks! - Carsten On May 19, 2010, at 8:53 PM, David Maus wrote: > When non-nil, clones of a subtree don't inherit the ID property. > Otherwise they do and it will be set to a new unique identifier. > --- > lisp/ChangeLog | 3 +++ > lisp/org.el | 16 ++++++++++++++-- > 2 files changed, 17 insertions(+), 2 deletions(-) > > diff --git a/lisp/ChangeLog b/lisp/ChangeLog > index ec2fa36..ba65761 100644 > --- a/lisp/ChangeLog > +++ b/lisp/ChangeLog > @@ -4,6 +4,9 @@ > when cache was cleared. > (org-clone-subtree-with-time-shift): Maybe create ID property > in cloned subtrees. > + (org-clone-delete-id): New customization variable. > + (org-clone-subtree-with-time-shift): Use customization > + variable `org-clone-delete-id'. > > 2010-05-17 Carsten Dominik > > diff --git a/lisp/org.el b/lisp/org.el > index 64da60a..88d636d 100644 > --- a/lisp/org.el > +++ b/lisp/org.el > @@ -105,6 +105,13 @@ > (require 'org-footnote) > > ;;;; Customization variables > +(defcustom org-clone-delete-id nil > + "Remove ID property of clones of a subtree. > +When non-nil, clones of a subtree don't inherit the ID property. > +Otherwise they inherit the ID property with a new unique > +identifier." > + :type 'boolean > + :group 'org-id) > > ;;; Version > > @@ -7204,13 +7211,18 @@ and still retain the repeater to cover > future instances of the task." > (with-temp-buffer > (insert template) > (org-mode) > - (org-id-get-create t) > + (goto-char (point-min)) > + (if org-clone-delete-id > + (org-entry-delete nil "ID") > + (org-id-get-create t)) > (buffer-string)))) > (with-temp-buffer > (insert template) > (org-mode) > (goto-char (point-min)) > - (if idprop (org-id-get-create t)) > + (and idprop (if org-clone-delete-id > + (org-entry-delete nil "ID") > + (org-id-get-create t))) > (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 - Carsten