diff options
author | Thanos Apollo <[email protected]> | 2024-01-09 10:38:01 +0200 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2024-01-09 10:38:01 +0200 |
commit | 689398a7711b548cdec2f31e3ac4ae5174d992bc (patch) | |
tree | d49200b4b678edb3bd95ca947094b6fe1e940384 /gnosis.el | |
parent | bdf07ba3adf599ac5027fd741923de7dfc41c851 (diff) |
Rewrite gnosis-review-is-due-p
Diffstat (limited to 'gnosis.el')
-rw-r--r-- | gnosis.el | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -749,6 +749,14 @@ Returns a list of unique tags." ;; Review ;;;;;;;;;; +(defun gnosis-review-is-due-p (note-id) + "Check if note with value of NOTE-ID for id is due for review. + +Check if it's suspended, and if it's due today." + (if (and (not (gnosis-suspended-p note-id)) + (gnosis-review-is-due-today-p note-id)) + t + nil)) (defun gnosis-review--algorithm (id success) "Return next review date & ef for note with value of id ID. @@ -761,11 +769,6 @@ 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 () "Return a list due notes id for current date. |