I have an org file tracking my tasks across various projects:
work.org
* Job 1
** Tasks
*** TODO rewrite frontend in coldfusion
* Job 2
** Tasks
*** TODO Convince boss to buy stadium
I can do an org-capture-template to capture tasks to work.org
's Job 1
header or Job 2
header, but what about Job 1 > Tasks
, and same for Job 2
?
For example:
(setq org-capture-templates
("j" "Job 1" entry (file+headline ,(concat org-directory "/work.org") "Job 1")
"* TODO %? \n"))
I tried, in place of "Job 1," "Job 1 Tasks," but that created a new top-level headline called "Job 1 Tasks." Based on a somewhat unrelated stackoverflow answer, I tried "*Job 1 Tasks", but again, that just created a new top-level headline.
How can I refer to a sub-header in an org-capture-template?
Tasks
from the second. But I may be wrong.file+olp
, as @TianshuWang points out in his answer, does the trick.