I have a capture template for TODO items defined as follows
("t" "todo" entry (file "~/org/refile.org")
"* TODO %?\n%U\n%a\n" :clock-in t :clock-resume t)
While editing a document, I would like to insert the template where my cursor is. An example foll ows:
My buffer looks like this:
* TODO make a sandwich
<cursor here>
I call my new command, org-insert-template
.
I am prompted with the available capture templates and choose [t] TODO
My buffer now looks like this:
* TODO make a sandwich
* TODO <cursor here>
:LOGBOOK:
CLOCK: [2019-05-06 Mon 23:09]--[2019-05-06 Mon 23:09] => 0:00
:END:
[2019-05-06 Mon 23:09]
Could you please provide guidance on implementation of org-insert-template
?