summaryrefslogtreecommitdiff
path: root/gnosis.el
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2023-12-25 18:00:23 +0200
committerThanos Apollo <[email protected]>2023-12-25 18:00:23 +0200
commit3102de141e433729ae330d1ca5b6f8e7cab5439e (patch)
tree97ee3793daae3a6dc0c4c39a18f75e9a770767b3 /gnosis.el
parent45aaf268c84c2f0af030485d9572883abbd5dc91 (diff)
gnosis-review-get-due-notes: Update to not include suspended notes
Diffstat (limited to 'gnosis.el')
-rw-r--r--gnosis.el9
1 files changed, 7 insertions, 2 deletions
diff --git a/gnosis.el b/gnosis.el
index 7120e24..da4848b 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -225,8 +225,13 @@ Returns a list of the form ((yyyy mm dd) ef)."
ff)))
(defun gnosis-review-get-due-notes ()
- "Get due notes for current date."
- (gnosis--select 'id 'review-log `(<= next-rev ',(gnosis-algorithm-date))))
+ "Get due notes id for current date.
+
+Select notes where:
+ - Next review schedulated date <= current date
+ - Not suspended."
+ (emacsql gnosis-db [:select [id] :from review-log :where (and (<= next-rev ',(gnosis-algorithm-date))
+ (not suspend))]))
(defun gnosis-review--get-offset (id)
"Get offset for note with value of id ID."