summaryrefslogtreecommitdiff
path: root/gnosis.el
diff options
context:
space:
mode:
Diffstat (limited to 'gnosis.el')
-rw-r--r--gnosis.el12
1 files changed, 8 insertions, 4 deletions
diff --git a/gnosis.el b/gnosis.el
index dfbf265..e3577bc 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -1375,10 +1375,14 @@ well."
(defun gnosis-review-get-due-notes ()
"Return a list due notes id for current date."
- (let ((notes (gnosis-select 'id 'notes '1=1 t)))
- (cl-loop for note in notes
- when (gnosis-review-is-due-p note)
- collect note)))
+ (let* ((old-notes (cl-loop for note in (gnosis-select 'id 'review-log '(> n 0) t)
+ when (gnosis-review-is-due-p note)
+ collect note))
+ (new-notes (cl-loop for note in (gnosis-select 'id 'review-log '(= n 0) t)
+ when (gnosis-review-is-due-p note)
+ collect note)))
+ (append (cl-subseq new-notes 0 gnosis-new-notes-limit) old-notes)))
+
(defun gnosis-get-new-notes (notes)
"Get new notes from NOTES."
(cl-assert (listp notes) nil "Notes must be a list.")