summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-08-11 23:01:52 +0300
committerThanos Apollo <[email protected]>2024-08-11 23:01:52 +0300
commit7c7f4bfda8d81dbca9a55550f442b4391148b4a5 (patch)
treee050c391e559b4912c0a67099be4f8aee05cd935
parent3de3c4626309198ae0fb869bd27b47e8a7f3ef8d (diff)
New function: review-get-overdue-notes.
* Return overdue notes, optionally from provided note IDs.
-rw-r--r--gnosis.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/gnosis.el b/gnosis.el
index 9708fdb..b46a8a2 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -1464,6 +1464,13 @@ well."
(append (cl-subseq new-notes 0 gnosis-new-notes-limit) old-notes)
(append old-notes (cl-subseq new-notes 0 gnosis-new-notes-limit)))))
+(defun gnosis-review-get-overdue-notes (&optional note-ids)
+ "Return overdue notes for current DATE.
+
+Optionally, provide NOTE-IDS of which the overdue ones will be returned."
+ (cl-loop for note in (or note-ids (gnosis-review-get-due-notes))
+ when (gnosis-review-note-overdue-p note)
+ collect note))
(defun gnosis-review-get-due-tags ()
"Return a list of due note tags."
(let ((due-notes (gnosis-review-get-due-notes)))