From 0c84493abc87fdd0f14588ad560729b7a453f314 Mon Sep 17 00:00:00 2001 From: Daniel Borchmann Date: Sun, 9 Oct 2022 11:36:43 +0200 Subject: [PATCH] Do not include TEMPLATE in inserted checklists References to item at point contained in templates are usually not meant to be considered manually, but just to automatically insert backreferences. --- site-lisp/db-org.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/site-lisp/db-org.el b/site-lisp/db-org.el index 08cd486..84c9926 100644 --- a/site-lisp/db-org.el +++ b/site-lisp/db-org.el @@ -876,8 +876,10 @@ barf 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)) + (insert "\nBacklinks (not DONE, no TEMPLATE, all parents, no archives):\n\n") + (org-dblock-write:db/org-backlinks '(:org-ql-match (and + (not (done)) + (not (ltags "TEMPLATE"))) :parent-depth nil :archive nil)) (insert "\n\nTemplate:\n")