diff options
| author | Paul Sexton <psexton.2a@gmail.com> | 2016-11-13 15:24:33 +1300 |
|---|---|---|
| committer | Paul Sexton <psexton.2a@gmail.com> | 2016-11-13 15:24:33 +1300 |
| commit | 6fc2bfe8c3477b04b162952f51cccbb2e3b86ad5 (patch) | |
| tree | dfe6f8acbed4614d044a4fb2cb45658775850139 | |
| parent | 562baba885a4d0bcc169e3713045594eb34f993e (diff) | |
| download | org-drill-b4fork.tar.gz org-drill-b4fork.zip | |
SM2 algorithm should now actually work.b4fork
| -rw-r--r--[-rwxr-xr-x] | org-drill.el | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/org-drill.el b/org-drill.el index 7c8d118..6dd55cf 100755..100644 --- 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) |
