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.
This commit is contained in:
Daniel - 2022-11-12 11:50:53 +01:00
parent 6f32e362a9
commit d8c8e2b272
No known key found for this signature in database
GPG Key ID: 784AA8DF0CCDF625
1 changed files with 3 additions and 2 deletions

View File

@ -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)))