summaryrefslogtreecommitdiff
path: root/gnosis.el
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-01-17 02:42:30 +0200
committerThanos Apollo <[email protected]>2024-01-17 02:47:13 +0200
commit9357fe4c96a8c127a66f52a51e4a3d5d51fcd7a7 (patch)
tree0e9dd56dc76ffda6676c65243d4db08dea1dd118 /gnosis.el
parent6b036ca26e43069fd38585b29d9225aa6cf0593b (diff)
Update gnosis-algorithm-next-interval
- Use keywords! - Add argument for initial-interval, successful-reviews, successful-reviews-c, fails-c, fails-t - Use initial-interval which is could be different for every note, instead of gnosis-algorithm-interval value. - Depending on the value of new arguments for total/consecutive fails/successful reviews calculate a different interval.
Diffstat (limited to 'gnosis.el')
-rw-r--r--gnosis.el19
1 files changed, 15 insertions, 4 deletions
diff --git a/gnosis.el b/gnosis.el
index 752d828..a1c356e 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -861,10 +861,21 @@ SUCCESS is a binary value, 1 = success, 0 = failure.
Returns a list of the form ((yyyy mm dd) ef)."
(let ((ff gnosis-algorithm-ff)
(ef (nth 2 (gnosis-get 'ef 'review `(= id ,id))))
- (t-success (gnosis-get 't-success 'review-log `(= id ,id))))
- (gnosis-algorithm-next-interval (gnosis-review--get-offset id)
- (gnosis-get 'n 'review-log `(= id ,id))
- ef success ff t-success)))
+ (t-success (gnosis-get 't-success 'review-log `(= id ,id)))
+ (c-success (gnosis-get 'c-success 'review-log `(= id ,id)))
+ (c-fails (gnosis-get 'c-fails 'review-log `(= id ,id)))
+ (t-fails (gnosis-get 't-fails 'review-log `(= id ,id)))
+ (initial-interval (gnosis-get 'interval 'review `(= id ,id))))
+ (gnosis-algorithm-next-interval :last-interval (gnosis-review--get-offset id)
+ :review-num (gnosis-get 'n 'review-log `(= id ,id))
+ :ef ef
+ :success success
+ :failure-factor ff
+ :successful-reviews t-success
+ :successful-reviews-c c-success
+ :fails-c c-fails
+ :fail-t t-fails
+ :initial-interval initial-interval)))
(defun gnosis-review-due-notes--with-tags ()
"Return a list of due note tags."