Commit b71929a2808e

Vincent Demeester <vincent@sbr.pm>
2026-02-08 21:41:55
Fixed org-batch-get-overdue to correctly detect past deadlines.
Changed predicate from '(deadline :before today)' to '(deadline :to -1)'. The :before predicate was incorrectly matching future deadlines.
1 parent db3e1a5
Changed files (1)
dots
config
emacs
dots/config/emacs/site-lisp/org-batch-functions.el
@@ -240,10 +240,10 @@ Returns nil if heading not found."
 
 (defun org-batch-get-overdue (file)
   "Get all tasks with DEADLINE before today from FILE.
-Uses org-ql's `deadline' predicate."
+Uses org-ql's `deadline' predicate with :to -1 to get past deadlines."
   (org-ql-select file
     '(and (todo "TODO" "NEXT" "STRT" "WAIT")
-          (deadline :before today))
+          (deadline :to -1))
     :action #'org-batch--element-to-alist-at-point))
 
 (defun org-batch-get-upcoming (file &optional days)