From 9db8450a908333fae457732a57f5c3f9858780c3 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Sun, 15 Jun 2008 08:04:14 +0200 Subject: [PATCH] Don't allow org-schedule/deadline to clobber repeaters. --- lisp/ChangeLog | 4 ++++ lisp/org.el | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7a135243b..b783fbdf9 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 2008-06-15 Carsten Dominik + * org.el (org-schedule, org-deadline): Protect scheduled and + deadline tasks against changes that accidently remove the + repeater. + * org-remember.el (org-remember-apply-template): Access the default time stored by `org-store-link'. diff --git a/lisp/org.el b/lisp/org.el index 569b72183..0c4f1b003 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -8712,7 +8712,9 @@ With argument REMOVE, remove any deadline from the item." (progn (org-remove-timestamp-with-keyword org-deadline-string) (message "Item no longer has a deadline.")) - (org-add-planning-info 'deadline nil 'closed))) + (if (org-get-repeat) + (error "Cannot change deadline on task with repeater, please do that by hand") + (org-add-planning-info 'deadline nil 'closed)))) (defun org-schedule (&optional remove) "Insert the SCHEDULED: string with a timestamp to schedule a TODO item. @@ -8722,7 +8724,9 @@ With argument REMOVE, remove any scheduling date from the item." (progn (org-remove-timestamp-with-keyword org-scheduled-string) (message "Item is no longer scheduled.")) - (org-add-planning-info 'scheduled nil 'closed))) + (if (org-get-repeat) + (error "Cannot reschedule task with repeater, please do that by hand") + (org-add-planning-info 'scheduled nil 'closed)))) (defun org-remove-timestamp-with-keyword (keyword) "Remove all time stamps with KEYWORD in the current entry." -- 2.11.4.GIT