summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-08-11 23:03:54 +0300
committerThanos Apollo <[email protected]>2024-08-11 23:03:54 +0300
commitf90f72b2bdf5713190711bbb921b58f1314e7e6c (patch)
tree7bd944433edcf75814ea9b0989de39d08c3fae5e
parent7c7f4bfda8d81dbca9a55550f442b4391148b4a5 (diff)
New function: review-get-due-notes--no-overdue.
* Return due notes, without overdue ones.
-rw-r--r--gnosis.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/gnosis.el b/gnosis.el
index b46a8a2..8ebb158 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -1471,6 +1471,14 @@ 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-notes--no-overdue (&optional note-ids)
+ "Return due notes, without overdue.
+
+Optionally, provide a list for due NOTE-IDS."
+ (let ((note-ids (or note-ids (length (gnosis-review-get-due-notes)))))
+ (cl-set-difference note-ids (gnosis-review-get-overdue-notes note-ids))))
+
(defun gnosis-review-get-due-tags ()
"Return a list of due note tags."
(let ((due-notes (gnosis-review-get-due-notes)))