Extend Org Mode capture templates to include various forms of tasks

Org's capture template now distinguish between simple tasks, complex
tasks (i.e., those that need a separate headline because other subtasks may
follow later) and tickets (complex tasks that have a ticket number and a
reference).  Those things are necessary for work and may be helpful also
elsewhere.
This commit is contained in:
Daniel - 2020-06-22 18:01:19 +02:00
parent c0f7ed37bc
commit a5393b597f
No known key found for this signature in database
GPG Key ID: 1C7071A75BB72D64
1 changed files with 20 additions and 11 deletions

31
init.el
View File

@ -1135,13 +1135,31 @@ in the main agenda view."
:commands (org-capture)
:init (setq org-capture-use-agenda-date nil
org-capture-templates
`(("t" "Todo"
`(("t" "Things to do")
("tt" "Single Task"
entry
(file db/org-default-refile-file)
,(concat "* TODO [#B] %^{What}\n"
"SCHEDULED: %(org-insert-time-stamp (org-read-date nil t \"+0d\"))\n"
":PROPERTIES:\n:CREATED: %U\n:END:\n"
"%?"))
("tc" "Record new complex task with first item"
entry
(file db/org-default-refile-file)
,(concat "* %^{Task Description}\n"
":PROPERTIES:\n:CREATED: %U\n:END:\n"
"\n** %^{First Thing to Do}\n"
":PROPERTIES:\n:CREATED: %U\n:END:\n"
"\n%?"))
("tT" "Record new ticket with first item"
entry
(file db/org-default-refile-file)
,(concat "* Ticket #%^{Ticket Number}: %^{Ticket Description}\n"
":PROPERTIES:\n:CREATED: %U\n:END:\n"
"\nReference: %^{Reference}\n"
"\n** %^{First Task}\n"
":PROPERTIES:\n:CREATED: %U\n:END:\n"
"\n%?"))
("n" "Note"
entry
(file db/org-default-refile-file)
@ -1194,16 +1212,7 @@ in the main agenda view."
plain
(clock)
"%c"
:immediate-finish t :empty-lines 1)
("T" "Record new ticket with first task"
entry
(file db/org-default-refile-file)
,(concat "* Ticket #%^{Ticket Number}: %^{Ticket Description}\n"
":PROPERTIES:\n:CREATED: %U\n:END:\n"
"\nReference: %^{Reference}\n"
"\n** %^{First Task}\n"
":PROPERTIES:\n:CREATED: %U\n:END:\n"
"\n%?"))))
:immediate-finish t :empty-lines 1)))
:config (progn
;; disable usage of helm for `org-capture'
(with-eval-after-load 'helm-mode