* Feature request: Prompt to remove deadline/scheduled dates
@ 2009-12-23 21:54 Paul Holcomb
2009-12-24 0:14 ` Matt Lundin
0 siblings, 1 reply; 8+ messages in thread
From: Paul Holcomb @ 2009-12-23 21:54 UTC (permalink / raw)
To: emacs-orgmode
Its great that there is a log when the DEADLINE or SCHEDULED value
changes for an entry. It would also be nice if you could remove the
deadline or scheduled value using the same interface so it could be
logged.
For example, with scheduled I might decide to do a certain task
next week, and schedule the task accordingly. Then, something
changes and I'm now not going to do the task anytime soon. It
shouldn't be scheduled and I don't want it to show up in the agenda
anymore.
It seems like adding an option to the date/time prompt to null out
the value works, but is this the right approach? When you do this
you end up with items with "SCHEDULED:" or "DEADLINE:" and no date
after them. These items don't show in the agenda, but it seems a
little ugly.
--
Paul Holcomb *pholcomb \@ cpoint net*
GPG key fingerprint 2B62 05AE EE74 845A 705F D716 28C4 FE1C 088F CFAC
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Feature request: Prompt to remove deadline/scheduled dates
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
0 siblings, 1 reply; 8+ messages in thread
From: Matt Lundin @ 2009-12-24 0:14 UTC (permalink / raw)
To: pholcomb; +Cc: emacs-orgmode
Paul Holcomb <pholcomb@cpoint.net> writes:
> Its great that there is a log when the DEADLINE or SCHEDULED value
> changes for an entry. It would also be nice if you could remove the
> deadline or scheduled value using the same interface so it could be
> logged.
>
> For example, with scheduled I might decide to do a certain task
> next week, and schedule the task accordingly. Then, something
> changes and I'm now not going to do the task anytime soon. It
> shouldn't be scheduled and I don't want it to show up in the agenda
> anymore.
>
> It seems like adding an option to the date/time prompt to null out
> the value works, but is this the right approach? When you do this
> you end up with items with "SCHEDULED:" or "DEADLINE:" and no date
> after them. These items don't show in the agenda, but it seems a
> little ugly.
I'm not entirely sure if this is what you are asking for, but you can
remove SCHEDULED and DEADLINE metadata by adding a prefix argument to
C-c C-s and C-c C-d.
,----
| C-c C-s runs the command org-schedule, which is an interactive
| compiled Lisp function in `org.el'.
|
| It is bound to C-c C-s, <menu-bar> <Org> <Dates and Scheduling>
| <Schedule Item>.
|
| (org-schedule &optional remove time)
|
| Insert the SCHEDULED: string with a timestamp to schedule a TODO item.
| With argument remove, remove any scheduling date from the item.
| When time is set, it should be an internal time specification, and the
| scheduling will use the corresponding date.
`----
Perhaps you are looking for something different---e.g., log info about
when an item was unscheduled? The phrase "so it could be logged" in the
first paragraph of your message makes me suspect I may not understand
your request.
Best,
Matt
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Feature request: Prompt to remove deadline/scheduled dates
2009-12-24 0:14 ` Matt Lundin
@ 2009-12-24 17:53 ` Paul Holcomb
2009-12-26 11:02 ` Carsten Dominik
0 siblings, 1 reply; 8+ messages in thread
From: Paul Holcomb @ 2009-12-24 17:53 UTC (permalink / raw)
To: Matt Lundin; +Cc: emacs-orgmode, pholcomb
On Wed, Dec 23, 2009 at 07:14:44PM -0500, Matt Lundin wrote:
> Paul Holcomb <pholcomb@cpoint.net> writes:
>
> > Its great that there is a log when the DEADLINE or SCHEDULED value
> > changes for an entry. It would also be nice if you could remove the
> > deadline or scheduled value using the same interface so it could be
> > logged.
> >
> I'm not entirely sure if this is what you are asking for, but you can
> remove SCHEDULED and DEADLINE metadata by adding a prefix argument to
> C-c C-s and C-c C-d.
That's my fault; I wasn't very clear.
Here's the problem: When you remove a deadline or schedule with the
prefix argument, it doesn't make an entry about the removed deadline
or schedule if you have the variable org-log-redeadline or
org-log-reschedule set to 'note, respectively.
From a quick glance, it looks like an easy patch to org-deadline and
org-schedule as well. Turns out I was just thinking about it the
wrong way yesterday.
Thanks for your followup here.
--
Paul Holcomb *pholcomb \@ cpoint net*
GPG key fingerprint 2B62 05AE EE74 845A 705F D716 28C4 FE1C 088F CFAC
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Re: Feature request: Prompt to remove deadline/scheduled dates
2009-12-24 17:53 ` Paul Holcomb
@ 2009-12-26 11:02 ` Carsten Dominik
2009-12-28 23:26 ` [PATCH] Log removal of " Paul Holcomb
0 siblings, 1 reply; 8+ messages in thread
From: Carsten Dominik @ 2009-12-26 11:02 UTC (permalink / raw)
To: pholcomb; +Cc: Matt Lundin, emacs-orgmode
On Dec 24, 2009, at 6:53 PM, Paul Holcomb wrote:
> On Wed, Dec 23, 2009 at 07:14:44PM -0500, Matt Lundin wrote:
>> Paul Holcomb <pholcomb@cpoint.net> writes:
>>
>>> Its great that there is a log when the DEADLINE or SCHEDULED value
>>> changes for an entry. It would also be nice if you could remove the
>>> deadline or scheduled value using the same interface so it could be
>>> logged.
>>>
>> I'm not entirely sure if this is what you are asking for, but you can
>> remove SCHEDULED and DEADLINE metadata by adding a prefix argument to
>> C-c C-s and C-c C-d.
>
> That's my fault; I wasn't very clear.
>
> Here's the problem: When you remove a deadline or schedule with the
> prefix argument, it doesn't make an entry about the removed deadline
> or schedule if you have the variable org-log-redeadline or
> org-log-reschedule set to 'note, respectively.
>
> From a quick glance, it looks like an easy patch to org-deadline and
> org-schedule as well. Turns out I was just thinking about it the
> wrong way yesterday.
>
> Thanks for your followup here.
Hi Paul,
would you like to propose a patch?
- Carsten
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] Log removal of deadline/scheduled dates
2009-12-26 11:02 ` Carsten Dominik
@ 2009-12-28 23:26 ` Paul Holcomb
2009-12-31 8:12 ` Carsten Dominik
0 siblings, 1 reply; 8+ messages in thread
From: Paul Holcomb @ 2009-12-28 23:26 UTC (permalink / raw)
To: Carsten Dominik; +Cc: Matt Lundin, emacs-orgmode, pholcomb
[-- 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
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] Log removal of deadline/scheduled dates
2009-12-28 23:26 ` [PATCH] Log removal of " Paul Holcomb
@ 2009-12-31 8:12 ` Carsten Dominik
2009-12-31 15:20 ` Paul Holcomb
0 siblings, 1 reply; 8+ messages in thread
From: Carsten Dominik @ 2009-12-31 8:12 UTC (permalink / raw)
To: pholcomb; +Cc: Matt Lundin, emacs-orgmode
Hi Paul, very nice, thank you.
One question:
What is the purpose of
+ (created . "CREATED %t")
??
- Carsten
On Dec 29, 2009, at 12:26 AM, Paul Holcomb wrote:
>
> 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
> <org.el-log-del-schedule-deadline.patch>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Log removal of deadline/scheduled dates
2009-12-31 8:12 ` Carsten Dominik
@ 2009-12-31 15:20 ` Paul Holcomb
2010-01-01 8:53 ` Carsten Dominik
0 siblings, 1 reply; 8+ messages in thread
From: Paul Holcomb @ 2009-12-31 15:20 UTC (permalink / raw)
To: Carsten Dominik; +Cc: Matt Lundin, emacs-orgmode, pholcomb
On Thu, Dec 31, 2009 at 09:12:10AM +0100, Carsten Dominik wrote:
> Hi Paul, very nice, thank you.
>
> One question:
>
> What is the purpose of
>
> + (created . "CREATED %t")
Mistake, please remove. This was part of a different patch set to
automatically add a "CREATED" property for new tasks. I will send
that separately as there are some issues with it still.
--
Paul Holcomb *pholcomb \@ cpoint net*
GPG key fingerprint 2B62 05AE EE74 845A 705F D716 28C4 FE1C 088F CFAC
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Log removal of deadline/scheduled dates
2009-12-31 15:20 ` Paul Holcomb
@ 2010-01-01 8:53 ` Carsten Dominik
0 siblings, 0 replies; 8+ messages in thread
From: Carsten Dominik @ 2010-01-01 8:53 UTC (permalink / raw)
To: pholcomb; +Cc: Matt Lundin, emacs-orgmode
Hi Paul,
I have applied your patch, thank you.
- Carsten
On Dec 31, 2009, at 4:20 PM, Paul Holcomb wrote:
> On Thu, Dec 31, 2009 at 09:12:10AM +0100, Carsten Dominik wrote:
>> Hi Paul, very nice, thank you.
>>
>> One question:
>>
>> What is the purpose of
>>
>> + (created . "CREATED %t")
>
> Mistake, please remove. This was part of a different patch set to
> automatically add a "CREATED" property for new tasks. I will send
> that separately as there are some issues with it still.
>
> --
> Paul Holcomb *pholcomb \@
> cpoint net*
> GPG key fingerprint 2B62 05AE EE74 845A 705F D716 28C4
> FE1C 088F CFAC
- Carsten
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2010-01-01 8:54 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH] Log removal of " Paul Holcomb
2009-12-31 8:12 ` Carsten Dominik
2009-12-31 15:20 ` Paul Holcomb
2010-01-01 8:53 ` Carsten Dominik
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).