From 7c7f4bfda8d81dbca9a55550f442b4391148b4a5 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Sun, 11 Aug 2024 23:01:52 +0300 Subject: New function: review-get-overdue-notes. * Return overdue notes, optionally from provided note IDs. --- gnosis.el | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gnosis.el') 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))) -- cgit v1.2.3