From: Paul Holcomb <pholcomb@cpoint.net>
To: Carsten Dominik <carsten.dominik@gmail.com>
Cc: Matt Lundin <mdl@imapmail.org>,
emacs-orgmode@gnu.org, pholcomb@cpoint.net
Subject: [PATCH] Log removal of deadline/scheduled dates
Date: Mon, 28 Dec 2009 17:26:32 -0600 [thread overview]
Message-ID: <20091228232632.GA7636@cpoint.net> (raw)
In-Reply-To: <E2F83154-2128-4B5D-A937-4CCE2B6FB687@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 234 bytes --]
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
[-- Attachment #2: org.el-log-del-schedule-deadline.patch --]
[-- Type: text/plain, Size: 3031 bytes --]
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")))))
[-- Attachment #3: Type: text/plain, Size: 201 bytes --]
_______________________________________________
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
next prev parent reply other threads:[~2009-12-28 23:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-23 21:54 Feature request: Prompt to remove deadline/scheduled dates Paul Holcomb
2009-12-24 0:14 ` Matt Lundin
2009-12-24 17:53 ` Paul Holcomb
2009-12-26 11:02 ` Carsten Dominik
2009-12-28 23:26 ` Paul Holcomb [this message]
2009-12-31 8:12 ` [PATCH] Log removal of " Carsten Dominik
2009-12-31 15:20 ` Paul Holcomb
2010-01-01 8:53 ` Carsten Dominik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091228232632.GA7636@cpoint.net \
--to=pholcomb@cpoint.net \
--cc=carsten.dominik@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=mdl@imapmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.