From 9c479396ca9d25653c5888870e967c327000937f Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Thu, 28 Dec 2023 07:32:21 +0200 Subject: Add gnosis-review-is-due-p --- gnosis.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gnosis.el b/gnosis.el index 3c0956f..7420252 100644 --- a/gnosis.el +++ b/gnosis.el @@ -422,6 +422,12 @@ Returns a list of the form ((yyyy mm dd) ef)." (gnosis-get 'n 'review-log `(= id ,id)) ef success ff c-success))) +(defun gnosis-review-is-due-p (note-id) + "Return t if unsuspended note with NOTE-ID is due today." + (emacsql gnosis-db `[:select [id] :from review-log :where (and (<= next-rev ',(gnosis-algorithm-date)) + (= suspend 0) + (= id ,note-id))])) + (defun gnosis-review-get-due-notes () "Get due notes id for current date. -- cgit v1.2.3