From 21bace61c89728798f8d283c65f18450f9482b71 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Thu, 28 Dec 2023 07:32:33 +0200 Subject: Add gnosis-review-due-notes--with-tags --- gnosis.el | 9 +++++++++ 1 file changed, 9 insertions(+) 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)))) -- cgit v1.2.3