I'm trying to make a 'class' template for org-capture.
What I want is to easily make this kind of entry:
* TODO <course>: Week <week> Lecture <number>
SCHEDULED: %^T
** TODO prepare for class: <course>-<week>-<number>
SCHEDULED: <two days before T> DEADLINE: <one day before T>
** TODO review class: <course>-<week>-<number>
SCHEDULED: <one day after T> DEADLINE: <two days after T>
Currently, I have this template.
(setq org-capture-templates
'(
("c" "Class" entry (file "~/sydbox/personal/workflow/class.txt")
"* TODO %^{Course}: Week %^{Week} Lecture %^{Number}\n SCHEDULED: %(org-insert-time-stamp (org-read-date nil t nil nil nil \" \"))\n location: %^{location} %?\n** TODO %\\1: prepare lecture %\\3 from week %\\2\n DEADLINE: %(org-insert-time-stamp (org-read-date nil t \"-1d\")) SCHEDULED: %(org-insert-time-stamp (org-read-date nil t \"-2d\"))\n** TODO %\\1: review lecture %\\3 from week %\\2\n DEADLINE: %(org-insert-time-stamp (org-read-date nil t \"+2d\")) SCHEDULED: %(org-insert-time-stamp (org-read-date nil t \"+1d\"))\n")
("e" "Exercise session" entry (file "~/sydbox/personal/workflow/class.txt")
))
However, now I have no idea how to input the dates. The date and time of the course should be prompted for (_only_once_).
org-last-changed-timestampwhich stores the last time-stamp that was used, so the user doesn't have to select the date again. - lawlistorg-modeentries: stackoverflow.com/a/22419713/2112489 I realize that the original poster probably wants to keep it simple by usingorg-capture-templates; however, I wanted to point out that there are other ways to accomplish the same goal. - lawlist