summaryrefslogtreecommitdiff
path: root/gnosis.el
diff options
context:
space:
mode:
Diffstat (limited to 'gnosis.el')
-rw-r--r--gnosis.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/gnosis.el b/gnosis.el
index 2d23fd9..e79448f 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -583,20 +583,21 @@ Returns a list of the form ((yyyy mm dd) ef)."
(= id ,note-id))]))
(defun gnosis-review-get-due-notes ()
- "Get due notes id for current date.
+ "Return a list due notes id for current date.
Select notes where:
- Next review date <= current date
- Not suspended."
- (emacsql gnosis-db `[:select [id] :from review-log :where (and (<= next-rev ',(gnosis-algorithm-date))
- (= suspend 0))]))
+ (apply #'append
+ (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)))
+ (gnosis-get-note-tags note-id))
due-notes)
:test 'equal)))