Automatically add backlinks when copying templates

Experimental

Backlinks are an integral part of the checklist for the item at point, so why
not include them per default?

Copying is for now done unconditionally and without any customization.  If those
will turn out necessary, then they will be added later.
This commit is contained in:
Daniel - 2022-10-09 10:25:39 +02:00
parent 393a683db4
commit 564990a1af
No known key found for this signature in database
GPG Key ID: 784AA8DF0CCDF625
1 changed files with 5 additions and 0 deletions

View File

@ -870,6 +870,11 @@ otherwise."
(unless template-pom
(user-error "Cannot find template via TEMPLATE_ID property or top-most sibling"))
(insert "\nBacklinks (not DONE, all parents, no archives):\n\n")
(org-dblock-write:db/org-backlinks '(:org-ql-match (not (done))
:parent-depth nil
:archive nil))
(insert "\n\nTemplate:\n")
(db/org-copy-body-from-item-to-point template-pom)))
(defun db/org-copy-body-from-item-to-point (pom)