summaryrefslogtreecommitdiff
path: root/gnosis.el
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2023-12-28 07:32:33 +0200
committerThanos Apollo <[email protected]>2023-12-28 07:32:44 +0200
commit21bace61c89728798f8d283c65f18450f9482b71 (patch)
tree0f952aee8b53d27c6f0f73358bdf280fca1236f4 /gnosis.el
parent9c479396ca9d25653c5888870e967c327000937f (diff)
Add gnosis-review-due-notes--with-tags
Diffstat (limited to 'gnosis.el')
-rw-r--r--gnosis.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/gnosis.el b/gnosis.el
index 7420252..82284cc 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -437,6 +437,15 @@ Select notes where:
(emacsql gnosis-db `[:select [id] :from review-log :where (and (<= next-rev ',(gnosis-algorithm-date))
(= suspend 0))]))
+(defun gnosis-review-due-notes--with-tags ()
+ "Return a list of due note tags."
+ (let ((due-notes (gnosis-review-get-due-notes)))
+ (cl-remove-duplicates
+ (cl-mapcan (lambda (note-id)
+ (gnosis-get-note-tags (car note-id)))
+ due-notes)
+ :test 'equal)))
+
(defun gnosis-review--get-offset (id)
"Get offset for note with value of id ID."
(let ((last-rev (gnosis-get 'last-rev 'review-log `(= id ,id))))