From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Holcomb Subject: [PATCH] Log removal of deadline/scheduled dates Date: Mon, 28 Dec 2009 17:26:32 -0600 Message-ID: <20091228232632.GA7636@cpoint.net> References: <20091223215416.GC6266@cpoint.net> <20091224175339.GG6266@cpoint.net> Reply-To: pholcomb@cpoint.net Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="sdtB3X0nJg68CQEu" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NPP6N-0003QN-VS for emacs-orgmode@gnu.org; Mon, 28 Dec 2009 18:34:16 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NPP6I-0003P5-BN for emacs-orgmode@gnu.org; Mon, 28 Dec 2009 18:34:14 -0500 Received: from [199.232.76.173] (port=54705 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NPP6I-0003P2-0E for emacs-orgmode@gnu.org; Mon, 28 Dec 2009 18:34:10 -0500 Received: from mailhost.cpoint.net ([204.10.55.14]:44972) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1NPP6H-0002X3-N7 for emacs-orgmode@gnu.org; Mon, 28 Dec 2009 18:34:09 -0500 Content-Disposition: inline In-Reply-To: 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: Carsten Dominik Cc: Matt Lundin , emacs-orgmode@gnu.org, pholcomb@cpoint.net --sdtB3X0nJg68CQEu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Patch to record a note for removal of SCHEDULED or DEADLINE property. -- Paul Holcomb *pholcomb \@ cpoint net* GPG key fingerprint 2B62 05AE EE74 845A 705F D716 28C4 FE1C 088F CFAC --sdtB3X0nJg68CQEu Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="org.el-log-del-schedule-deadline.patch" 1 files changed, 17 insertions(+), 1 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 27af308..c57b71c 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -2060,7 +2060,10 @@ When nil, only the date will be recorded." (state . "State %-12s from %-12S %t") (note . "Note taken on %t") (reschedule . "Rescheduled from %S on %t") + (delschedule . "Not scheduled, was %S on %t") (redeadline . "New deadline from %S on %t") + (deldeadline . "Removed deadline, was %S on %t") + (created . "CREATED %t") (clock-out . "")) "Headings for notes added to entries. The value is an alist, with the car being a symbol indicating the note @@ -2074,6 +2077,7 @@ empty string. In fact, it is not a good idea to change the `state' entry, because agenda log mode depends on the format of these entries." + :group 'org-todo :group 'org-progress :type '(list :greedy t @@ -2083,8 +2087,10 @@ agenda log mode depends on the format of these entries." state) string) (cons (const :tag "Heading when just taking a note" note) string) (cons (const :tag "Heading when clocking out" clock-out) string) + (cons (const :tag "Heading when an item is no longer scheduled" delschedule) string) (cons (const :tag "Heading when rescheduling" reschedule) string) - (cons (const :tag "Heading when changing deadline" redeadline) string))) + (cons (const :tag "Heading when changing deadline" redeadline) string + (cons (const :tag "Heading when deleting a deadline" deldeadline) string)))) (unless (assq 'note org-log-note-headings) (push '(note . "%t") org-log-note-headings)) @@ -10644,6 +10650,9 @@ scheduling will use the corresponding date." (let ((old-date (org-entry-get nil "DEADLINE"))) (if remove (progn + (when (and old-date org-log-redeadline) + (org-add-log-setup 'deldeadline nil old-date 'findpos + org-log-redeadline)) (org-remove-timestamp-with-keyword org-deadline-string) (message "Item no longer has a deadline.")) (if (org-get-repeat) @@ -10665,6 +10674,9 @@ scheduling will use the corresponding date." (let ((old-date (org-entry-get nil "SCHEDULED"))) (if remove (progn + (when (and old-date org-log-reschedule) + (org-add-log-setup 'delschedule nil old-date 'findpos + org-log-reschedule)) (org-remove-timestamp-with-keyword org-scheduled-string) (message "Item is no longer scheduled.")) (if (org-get-repeat) @@ -10919,8 +10931,12 @@ EXTRA is additional text that will be inserted into the notes buffer." (or org-log-note-state ""))) ((eq org-log-note-purpose 'reschedule) "rescheduling") + ((eq org-log-note-purpose 'delschedule) + "no longer scheduled") ((eq org-log-note-purpose 'redeadline) "changing deadline") + ((eq org-log-note-purpose 'deldeadline) + "removing deadline") ((eq org-log-note-purpose 'note) "this entry") (t (error "This should not happen"))))) --sdtB3X0nJg68CQEu Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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 --sdtB3X0nJg68CQEu--