Commits

Anonymous committed 872dde6

- Improved progress bar while collecting due items. It is no longer able to overflow
to multiple lines.
- Added documentation for 'org-drill-sm5-initial-interval'.

  • Participants
  • Parent commits 7362b57
  • Tags 2.3.5

Comments (0)

Files changed (2)

 ;;; org-drill.el - Self-testing using spaced repetition
 ;;;
 ;;; Author: Paul Sexton <eeeickythump@gmail.com>
-;;; Version: 2.3.4
+;;; Version: 2.3.5
 ;;; Repository at http://bitbucket.org/eeeickythump/org-drill/
 ;;;
 ;;;
        due))))
 
 
+(defun org-drill-progress-message (collected scanned)
+  (when (zerop (% scanned 50))
+    (let* ((meter-width 40)
+           (sym1 (if (oddp (floor scanned (* 50 meter-width))) ?| ?.))
+           (sym2 (if (eql sym1 ?.) ?| ?.)))
+      (message "Collecting due drill items:%4d %s%s"
+              collected
+              (make-string (% (ceiling scanned 50) meter-width)
+                           sym2)
+              (make-string (- meter-width (% (ceiling scanned 50) meter-width))
+                           sym1)))))
+
+
 (defun org-drill (&optional scope resume-p)
   "Begin an interactive 'drill session'. The user is asked to
 review a series of topics (headers). Each topic is initially
                     (warned-about-id-creation nil))
                 (org-map-drill-entries
                  (lambda ()
-                   (when (zerop (% (incf cnt) 50))
-                     (message "Processing drill items: %4d%s"
+                   (org-drill-progress-message
                               (+ (length *org-drill-new-entries*)
                                  (length *org-drill-overdue-entries*)
                                  (length *org-drill-young-mature-entries*)
                                  (length *org-drill-old-mature-entries*)
                                  (length *org-drill-failed-entries*))
-                              (make-string (ceiling cnt 50) ?.)))
+                              (incf cnt))
                    (cond
                     ((not (org-drill-entry-p))
                      nil)               ; skip
 effect on the SM2 algorithm.
 
 
+*** Adjusting the first interval (SM5 algorithm only)
+
+
+In the SM5 algorithm, the initial interval after the first successful
+presentation of an item is /always/ 4 days. If you wish to change this for some
+reason, you can do so with:
+
+#+BEGIN_EXAMPLE
+(setq org-drill-sm5-initial-interval 5.0)
+#+END_EXAMPLE
+
+note that this will have no effect if you are not using the SM5 algorithm.
+
+
 *** Adjusting item difficulty globally