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

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

[nongnu] elpa/org-drill 8618a532c7 049/251: - Improved progress bar whil


From: ELPA Syncer
Subject: [nongnu] elpa/org-drill 8618a532c7 049/251: - Improved progress bar while collecting due items. It is no longer able to overflow
Date: Mon, 17 Jan 2022 18:59:00 -0500 (EST)

branch: elpa/org-drill
commit 8618a532c78fbdc7becc0b3c34c3bb1a027d75cb
Author: eeeickythump <devnull@localhost>
Commit: eeeickythump <devnull@localhost>

    - 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'.
---
 org-drill.el  | 20 ++++++++++++++++----
 org-drill.org | 14 ++++++++++++++
 2 files changed, 30 insertions(+), 4 deletions(-)

diff --git a/org-drill.el b/org-drill.el
index 29e1657649..9f84fac481 100755
--- a/org-drill.el
+++ b/org-drill.el
@@ -2,7 +2,7 @@
 ;;; 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/
 ;;;
 ;;;
@@ -2284,6 +2284,19 @@ one of the following values:
        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
@@ -2344,14 +2357,13 @@ than starting a new one."
                     (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
diff --git a/org-drill.org b/org-drill.org
index 0651e5f2a3..b53ab2b633 100755
--- a/org-drill.org
+++ b/org-drill.org
@@ -675,6 +675,20 @@ used. For the SM5 algorithm it will affect early 
repetitions only. It has no
 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
 
 



reply via email to

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