emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/org-drill 6fc2bfe8c3 103/251: SM2 algorithm should now act


From: ELPA Syncer
Subject: [nongnu] elpa/org-drill 6fc2bfe8c3 103/251: SM2 algorithm should now actually work.
Date: Mon, 17 Jan 2022 18:59:05 -0500 (EST)

branch: elpa/org-drill
commit 6fc2bfe8c3477b04b162952f51cccbb2e3b86ad5
Author: Paul Sexton <psexton.2a@gmail.com>
Commit: Paul Sexton <psexton.2a@gmail.com>

    SM2 algorithm should now actually work.
---
 org-drill.el | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/org-drill.el b/org-drill.el
old mode 100755
new mode 100644
index 7c8d11856c..6dd55cf06d
--- a/org-drill.el
+++ b/org-drill.el
@@ -1060,6 +1060,12 @@ Returns a list: (INTERVAL REPEATS EF FAILURES MEAN 
TOTAL-REPEATS OFMATRIX), wher
 - REPEATS is incremented by 1.
 - EF is modified based on the recall quality for the item.
 - OF-MATRIX is not modified."
+  (if (zerop n) (setq n 1))
+  (if (null ef) (setq ef 2.5))
+  (setq meanq (if meanq
+                  (/ (+ quality (* meanq total-repeats 1.0))
+                     (1+ total-repeats))
+                quality))
   (assert (> n 0))
   (assert (and (>= quality 0) (<= quality 5)))
   (if (<= quality org-drill-failure-quality)
@@ -2455,7 +2461,10 @@ RESUMING-P is true if we are resuming a suspended drill 
session."
           (error "Unexpectedly ran out of pending drill items"))
         (save-excursion
           (org-drill-goto-entry m)
+          (message "[debug] org-drill: at marker position %s" (marker-position 
m))
           (cond
+           ((not (org-at-heading-p))
+            (error "Not at heading for entry %s" m))
            ((not (org-drill-entry-due-p))
             ;; The entry is not due anymore. This could arise if the user
             ;; suspends a drill session, then drills an individual entry,
@@ -2464,6 +2473,7 @@ RESUMING-P is true if we are resuming a suspended drill 
session."
             (sit-for 0.3)
             nil)
            (t
+            (org-show-entry)
             (setq result (org-drill-entry))
             (cond
              ((null result)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]