[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
PATCH: Re: Recurring TODO with hours not scheduled correctly
From: |
Justin Vallon |
Subject: |
PATCH: Re: Recurring TODO with hours not scheduled correctly |
Date: |
Sat, 7 Dec 2019 11:00:16 -0500 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 |
On 12/3/19 1:03 AM, Justin Vallon wrote:
> Newbie org-mode user. Wondering about some odd recurrence behavior.
...
> My understanding of .+TERM is that the new scheduled time should be now
> + term. However, from this instance and testing with other terms, it
> seems to be "current date + scheduled-time" + HOURS. Completing again
> advances the time by one hour, leaving the date as today.
>
> For ".+2d", the new scheduled date/time is 2d away (at the same time),
> and re-completing does not change the new schedule time.
Following up with a patch to make .+1h work "like" .+1d:
- When computing the new scheduled date, the repeater-type "." would
shift the scheduled date to today, then adjust by the interval.
Shifting the date would leave the time unchanged
- When shifting by hours, the old time would remain, and then be shifted
by the interval
- With the patch, ".+1h" will shift schedule-date to now (vs today),
then add "1h" as before. ".+1d" will have the old behavior (shift date,
but leave time alone).
- That is:
- ".+1d" is tomorrow at same scheduled time
- ".+1h" is in one hour
- ".+24h" is 24h from now.
I would argue that the old behavior is broken (".+1h" advances the
schedule time by an hour), so retaining the old behavior is not useful
(ie: no option is required).
Changes:
- org-timestamp-change: Add a 'now tag to set the current time to now
- org-auto-repeat-maybe: if interval is '.+Nh', relative time is "now"
(instead of today)
"now" might be usable when the interval is days, but I am not sure about
the difference between (org-today) and (current-time) (ie: they seem
different), so the patch only applies for intervals of hours.
Patch is relative to org 9.3.
--
-Justin
address@hidden
org.el.patch
Description: Text document