From 21200d8bc4f4abd8bfaa9aca0f1370d2d0a5c111 Mon Sep 17 00:00:00 2001 From: Daniel Borchmann Date: Wed, 10 Jul 2024 15:23:56 +0200 Subject: [PATCH] Try to refine Org QL query for currently active DATE entries `ts-now` should be better than `today`, as it includes the current time. --- site-lisp/db-org.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/site-lisp/db-org.el b/site-lisp/db-org.el index 9ecd495..eaa72a9 100644 --- a/site-lisp/db-org.el +++ b/site-lisp/db-org.el @@ -1289,11 +1289,12 @@ inserting the checklist." :select '(cons (org-entry-get (point) "ITEM") (org-id-get-create)) - :where '(and ; XXX: this is not quite right yet + :where `(and ; XXX: this is not quite right yet (tags "DATE") (not (done)) - (ts-active :from today) - (ts-active :to today))))) + ;; XXX: calling `ts-now' twice might be stupid + (ts-active :from ,(ts-now)) + (ts-active :to ,(ts-now)))))) (insert "Concurrent DATEs:\n") (dolist (date concurrent-dates) (insert "- " (org-link-make-string (cdr date) (car date)) "\n"))