My projects are very deadline driven. I want to create an org-capture template that I only need to input the deadline date to the Project head line once, and all deadlines of the subtasks in the template is calculated from the project's deadline. For example.
;; Org-capture template
** Project %?
DEADLINE: %^{Project Deadline}t <- how can i use this prompt to calculate the deadlines for subtasks below
*** TODO Task 1
DEADLINE < 5 months before project headline's prompt>
*** TODO Task 2
DEADLINE <1 months before project headline's prompt>
I don't want to prompt for the deadline for each subtask in the template since each project has about 20 subtasks.
Is there a way to cache the date entered in the Project's dead line %^{Project Deadline}t ?
Related
I have some TODO's in my recur.org file which look like this:
** TODO Do this thing every day.
SCHEDULED: <2016-09-19 Mon .+1d>
For me, that . before the +1d means "if you happen to do this job late, then when you mark it as done it will re-schedule itself to the day after when it was marked as done." This is correct, because this job does have the property that if I don't do it for 4 days, then I don't need to do it 4 times to catch up, I just need to do it once. On the other hand, if I don't do it for 4 days then I really need to get this job done and I would hope that it gets flagged up in red when I look at my weekly agenda view with C-c a a in emacs org-mode.
Unfortunately, this does not happen. The standard agenda view lists this task as
[stuff in red here with Sched. 4x etc etc]
recur: Scheduled: TODO [#A] Do this thing every day
and the entry is in green with no indication that I'm late. This is presumably because the fact that it is scheduled every day means in particular that it is scheduled today, and so hang the fact that it's still also scheduled 4 days ago.
This is not the behaviour I want. I would like to be able to make a repeated TODO which, when done, resets the scheduled time to today+[interval], and yet I am still warned if I fail to do the task for a time period which exceeds the interval.
Experiments indicate that jobs with things like .+1w behave the same way -- they're 6 days overdue and then all of a sudden they're not overdue any more.
Could I write a custom agenda command somehow, to ensure these jobs are flagged when they are late?
Added 3rd Oct: Some further experimentation has revealed that the dot isn't the problem -- this is also the default behaviour with recurring TODOs that just are due to be rescheduled after a time delay shorter than the time it's taken me to fail to do them.
However I am now slightly more optimistic that this can somehow be solved with a custom agenda view. For C-c a L gives me a view where the recurring task shows up on the first day it's scheduled and not done, rather than the most recent day it's scheduled and not done. However C-c a L is no good for three reasons: (1) it shows tasks which are DONE (2) it shows priority C tasks which are late (and I am much less interested in these) and (3) it only acts on the current buffer. So if I learn enough about agenda views I feel like I might be able to answer my own question.
Added 9th Oct: Having now read the relevant pages of the org manual I realise that I still do not know how to do this. I am surprised. What I am asking for is an agenda view which encompasses all my org files, gives me a weekly agenda like C-c a a, and which flags the first not-yet-done occurrence of each repeating TODO task which has priority A. From a purely logic/programming point of view I don't see any obstruction to this, and I would be quite surprised if there were no way to do this in org-mode, but I certainly can't find it. Help!
Suppose I plan to meet with someone multiple times, but not on a regular schedule that would allow me to set it as a repeating task. I can type in something like
** TODO Meeting with Gus
SCHEDULED: <2014-04-25 FRI 10:00-10:30>
SCHEDULED: <2014-04-28 MON 15:30-16:00>
Scheduling the first meeting using C-c C-s (org-schedule) is easy enough. I cannot find a way to schedule the second without typing everything in by hand. If I hit C-c C-s again, it changes the time of the first meeting rather than scheduling a second meeting. Is there a more efficient way to do this?
How about:
** Meet with a dude
<2014-04-25 Fri 13:00-13:30>
<2014-04-27 Sun 14:00-14:30>
<2014-04-29 Tue 10:00-10:30>
<2014-05-02 Fri 08:00-08:30>
This will show up in your agenda at the indicated times.
I started getting this issue with repeated tasks now. Assume I have a task like this:
** TODO test task
SCHEDULED: <2013-11-12 Tue + 1m>
I want to close and schedule it for next month. So I do C-c C-t. After doing this I get the following:
** DONE test task
CLOSED: [2013-11-12 Tue 17:10] SCHEDULED: <2013-11-12 Tue + 1m>
- CLOSING NOTE [2013-11-12 Tue 17:10]
Issues:
As you can see, the scheduled date is same as the old date.
TODO has changed to DONE. It should stay in TODO with the new scheduled dates.
This issue started appearing recently. Any help is appreciated.
Remove the space between + and 1m.
I am using Emacs org-mode. Assume it is 2012-11-10 (today) and I have a TODO item:
**** LATER [#D] call John :phone:
SCHEDULED: <2012-07-23 Mon .+1m>
- State "DONE" from "TODO" [2012-06-23 Sat 12:21]
:PROPERTIES:
:LAST_REPEAT: [2012-06-23 Sat 12:21]
:END:
In the agenda view that I get with Ctrl-c a a this shows up as:
TODO: Sched.19x: LATER [#D] call John :phone:
and is sorted among the other items that have a SCHEDULED date 19 days ago. However, the item above has not been worked on for almost four months, so it should actually be sorted among the items SCHEDULED on <2012-07-23 Mon> (~110 days ago).
I consider this a bug, but I wanted to know whether there is any option I could try to fix that behavior. I have searched the internet for over an hour but did not find a solution.
It's not a bug but the expected behavior.
You scheduled the task with the repeated interval
SCHEDULED: <2012-07-23 Mon .+1m>
which means that the task is kinda re-scheduled every month. The last time it was 2012-10-27, 19 days ago.
You can remove the repeated interval
SCHEDULED: <2012-07-23 Mon>
then the task will be shown as scheduled 110 days ago.
I want to track habits using org-mode. For example, I want to do exercise 3 times every week. Is there a way to schedule 3 times a task every week irrespective of the date in org-mode?
You should be able to more or less do that using org habit tracking (See: Org-Habits).
To load org-habits you would need to add it to org-modules
(add-to-list 'org-modules "org-habit")
Then:
Use C-c C-s to set SCHEDULED.
Use C-c C-t to set your exercise TODO.
Use C-c C-x p to have the STYLE Property habit (add in any other properties as desired as well).
Now the lines like this should have be appended after the title:
:PROPERTIES:
:STYLE: habit
:END:
A single habit should suffice, it will not be exactly 3 times per week, but over time it will average out to such. If you use a scheduled repeater that is .+2d/3d you will be prompted to perform the habit no more often than every second day, and no less often than every 3. (This averages out to 2.9 times per week if you continue it long enough. Over 6 weeks (42 days) you would complete it at least 14 times, at most 21, or 17.5 on average. 18 times in 6 weeks would be 3x per week).
Your final habit should look something like this initially, as you complete it DONE logging will be added in and the last-repeat will be kept track of as a property:
** TODO Exercise
SCHEDULED: <2012-01-06 Fri .+2d/3d>
:PROPERTIES:
:STYLE: habit
:END:
Note: If you get the error Symbol's value as variable is void: org-modules when trying to load the org-habit module, you might want to try the following instead:
(require 'org)
(require 'org-install)
(add-to-list 'org-modules "org-habit")
You can use a timestamp with repeater interval as described in the
manual.
A timestamp may contain a _repeater interval_, indicating that it
applies not only on the given date, but again and again after a
certain interval of N days (d), weeks (w), months (m), or years
(y). The following will show up in the agenda every Wednesday:
* Pick up Sam at school <2007-05-16 Wed 12:30 +1w>
I can't see any way to do this with one entry. The way I do similar things is to create a special TODO sequence for is, say (sequence ('HABIT' '|' 'CHECK')) with setq org-todo-keywords
Then simply write three entries, each on a week repeat
* HABIT Monday workout
DEADLINE: <2012-01-09 Mon +1w>
* HABIT Wednessday workout
DEADLINE: <2012-01-11 Wed +1w>
* HABIT Friday workout
DEADLINE: <2012-01-06 Fri +1w>
It's not that clean, but it works.