From d8c8e2b27238f3c275fafbe06bc5be9a5edec2fb Mon Sep 17 00:00:00 2001 From: Daniel Borchmann Date: Sat, 12 Nov 2022 11:50:53 +0100 Subject: [PATCH] Do not backlinks in checklists when scheduled in the future Items scheduled in the future are generally ignored, so let's do this in checklists as well. --- site-lisp/db-org.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/site-lisp/db-org.el b/site-lisp/db-org.el index d711fe9..6ddd0bb 100644 --- a/site-lisp/db-org.el +++ b/site-lisp/db-org.el @@ -888,14 +888,15 @@ otherwise." (let ((parent-depth (--when-let (org-entry-get (point) "CHECKLIST_BACKLINK_DEPTH" nil) (string-to-number it)))) - (insert (format "\nBacklinks (not DONE, no TEMPLATE, %s, no archives):\n\n" + (insert (format "\nBacklinks (not DONE, no TEMPLATE, %s, no archives, not scheduled in the future):\n\n" (if parent-depth (format "parent-depth %d" parent-depth) "all parents"))) (org-dblock-write:db/org-backlinks (list :org-ql-match '(and (not (done)) - (not (ltags "TEMPLATE"))) + (not (ltags "TEMPLATE")) + (not (scheduled :from 1))) :parent-depth (--when-let (org-entry-get (point) "CHECKLIST_BACKLINK_DEPTH" nil) (string-to-number it)) :archive nil)))