[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/org-drill a803289de9 137/251: Remove last of earmuff varia
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/org-drill a803289de9 137/251: Remove last of earmuff variables |
Date: |
Mon, 17 Jan 2022 18:59:09 -0500 (EST) |
branch: elpa/org-drill
commit a803289de9e1d94975bb9e6d60eff74b2374a6a5
Author: Phillip Lord <phillip.lord@russet.org.uk>
Commit: Phillip Lord <phillip.lord@russet.org.uk>
Remove last of earmuff variables
---
org-drill.el | 57 +++++++++++++++++++++++++++++----------------------------
1 file changed, 29 insertions(+), 28 deletions(-)
diff --git a/org-drill.el b/org-drill.el
index 1c91f24831..e7e46f4aa7 100644
--- a/org-drill.el
+++ b/org-drill.el
@@ -629,18 +629,19 @@ interval was greater than ORG-DRILL-DAYS-BEFORE-OLD
days.")
(failed-entries :initform nil)
(again-entries :initform nil)
(done-entries :initform nil)
-
- )
+ (current-item
+ :initform nil
+ :documentation "Set to the marker for the item currently being tested.")
+ (cram-mode
+ :initform nil
+ :documementation "Are we in 'cram mode', where all items are considered due
+for review unless they were already reviewed in the recent past?"
+ ))
:documentation "An org-drill session object carries data about
the current state of a particular org-drill session." )
(defvar org-drill-last-session nil)
-(defvar *org-drill-current-item* nil
- "Set to the marker for the item currently being tested.")
-(defvar *org-drill-cram-mode* nil
- "Are we in 'cram mode', where all items are considered due
-for review unless they were already reviewed in the recent past?")
(defvar org-drill-scheduling-properties
'("LEARN_DATA" "DRILL_LAST_INTERVAL" "DRILL_REPEATS_SINCE_FAIL"
"DRILL_TOTAL_REPEATS" "DRILL_FAILURE_COUNT" "DRILL_AVERAGE_QUALITY"
@@ -901,7 +902,7 @@ drill entry."
- A negative integer - item is scheduled that many days in the future.
- A positive integer - item is scheduled that many days in the past."
(cond
- (*org-drill-cram-mode*
+ ((oref session cram-mode)
(let ((hours (org-drill-hours-since-last-review)))
(and (org-drill-entry-p)
(or (null hours)
@@ -1529,7 +1530,7 @@ of QUALITY."
((and (>= ch ?0) (<= ch ?5))
(let ((quality (- ch ?0))
(failures (org-drill-entry-failure-count)))
- (unless *org-drill-cram-mode*
+ (unless (oref session cram-mode)
(save-excursion
(let ((quality (if (org-drill--entry-lapsed-p) 2 quality)))
(org-drill-smart-reschedule quality
@@ -1620,7 +1621,7 @@ the current topic."
(char-to-string
(cond
((eql status :failed) ?F)
- (*org-drill-cram-mode* ?C)
+ ((oref session cram-mode) ?C)
(t
(cl-case status
(:new ?N) (:young ?Y) (:old ?o) (:overdue ?!)
@@ -2570,7 +2571,7 @@ See `org-drill' for more details."
(defun org-drill-entries-pending-p (session)
(or (oref session again-entries)
- *org-drill-current-item*
+ (oref session current-item)
(and (not (org-drill-maximum-item-count-reached-p))
(not (org-drill-maximum-duration-reached-p session))
(or (oref session new-entries)
@@ -2581,7 +2582,7 @@ See `org-drill' for more details."
(oref session again-entries)))))
(defun org-drill-pending-entry-count (session)
- (+ (if (markerp *org-drill-current-item*) 1 0)
+ (+ (if (markerp (oref session current-item)) 1 0)
(length (oref session new-entries))
(length (oref session failed-entries))
(length (oref session young-mature-entries))
@@ -2594,7 +2595,7 @@ See `org-drill' for more details."
"Returns true if the current drill session has continued past its
maximum duration."
(and org-drill-maximum-duration
- (not *org-drill-cram-mode*)
+ (not (oref session cram-mode))
(oref session start-time)
(> (- (float-time (current-time))
(oref session start-time))
@@ -2605,7 +2606,7 @@ maximum duration."
"Returns true if the current drill session has reached the
maximum number of items."
(and org-drill-maximum-items-per-session
- (not *org-drill-cram-mode*)
+ (not (oref session cram-mode))
(>= (if org-drill-item-count-includes-failed-items-p
(+ (length (oref session done-entries))
(length (oref session again-entries)))
@@ -2670,13 +2671,13 @@ RESUMING-P is true if we are resuming a suspended drill
session."
(while (org-drill-entries-pending-p session)
(let ((m (cond
((or (not resuming-p)
- (null *org-drill-current-item*)
- (not (org-drill-entry-p *org-drill-current-item*)))
+ (null (oref session current-item))
+ (not (org-drill-entry-p (oref session current-item))))
(org-drill-pop-next-pending-entry session))
(t ; resuming a suspended session.
(setq resuming-p nil)
- *org-drill-current-item*))))
- (setq *org-drill-current-item* m)
+ (oref session current-item)))))
+ (setf (oref session current-item) m)
(unless m
(error "Unexpectedly ran out of pending drill items"))
(save-excursion
@@ -2704,7 +2705,7 @@ RESUMING-P is true if we are resuming a suspended drill
session."
(setq end-pos (point-marker))
(cl-return-from org-drill-entries nil))
((eql result 'skip)
- (setq *org-drill-current-item* nil)
+ (setf (oref session current-item) nil)
nil) ; skip this item
(t
(cond
@@ -2715,7 +2716,7 @@ RESUMING-P is true if we are resuming a suspended drill
session."
(push-end m (oref session again-entries)))
(t
(push m (oref session done-entries))))
- (setq *org-drill-current-item* nil))))))))))
+ (setf (oref session current-item) nil))))))))))
@@ -3046,7 +3047,7 @@ work correctly with older versions of org mode. Your org
mode version (%s) appea
(cl-block org-drill
(unless resume-p
(org-drill-free-markers session t)
- (setf *org-drill-current-item* nil
+ (setf (oref session current-item) nil
(oref session done-entries) nil
(oref session dormant-entry-count) 0
(oref session due-entry-count) 0
@@ -3074,7 +3075,7 @@ work correctly with older versions of org mode. Your org
mode version (%s) appea
(setf (oref session due-entry-count)
(org-drill-pending-entry-count session))
(cond
- ((and (null *org-drill-current-item*)
+ ((and (null (oref session current-item))
(null (oref session new-entries))
(null (oref session failed-entries))
(null (oref session overdue-entries))
@@ -3089,7 +3090,7 @@ work correctly with older versions of org mode. Your org
mode version (%s) appea
)))
(progn
(unless end-pos
- (setq *org-drill-cram-mode* nil)
+ (setf (oref session cram-mode) nil)
(org-drill-free-markers session (oref session done-entries))))))
(cond
(end-pos
@@ -3124,7 +3125,7 @@ all drill items are considered to be due for review,
unless they
have been reviewed within the last `org-drill-cram-hours'
hours."
(interactive)
- (setq *org-drill-cram-mode* t)
+ (setq (oref session cram-mode) t)
(org-drill scope drill-match))
(defun org-drill-cram-tree ()
@@ -3155,15 +3156,15 @@ unreviewed items. If there are no leftover items in
memory, a full
scan will be performed."
(interactive)
(let ((session org-drill-last-session))
- (setq *org-drill-cram-mode* nil)
+ (setf (oref session cram-mode) nil)
(cond
((cl-plusp (org-drill-pending-entry-count session))
(org-drill-free-markers session (oref session done-entries))
- (if (markerp *org-drill-current-item*)
- (free-marker *org-drill-current-item*))
+ (if (markerp (oref session current-item))
+ (free-marker (oref session current-item)))
(setf (oref session start-time) (float-time (current-time)))
(setf (oref session done-entries) nil
- *org-drill-current-item* nil)
+ (oref session current-item) nil)
(org-drill scope drill-match t))
(t
(org-drill scope drill-match)))))
- [nongnu] elpa/org-drill fa03aa7696 087/251: Added tag 2.4.8 for changeset 080a526cc34a, (continued)
- [nongnu] elpa/org-drill fa03aa7696 087/251: Added tag 2.4.8 for changeset 080a526cc34a, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill a9d3447041 101/251: Reinstated dependency on 'org-learn' library., ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 562baba885 102/251: Added tag 2.6.1 for changeset 586920548547, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill d9ffa4b91f 104/251: Add support for typing in buffer input, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 45e92eca74 109/251: Add org-drill-cram-tree function, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill ef79a22735 111/251: Add explain support, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill ef9bad812c 112/251: Explain tags now inherit, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 6959903b99 113/251: Explain status of fork, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 507daae5a2 128/251: Remove org-drill-session-qualities, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 0e89d9a638 134/251: Remove more variables, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill a803289de9 137/251: Remove last of earmuff variables,
ELPA Syncer <=
- [nongnu] elpa/org-drill df13d89a4c 119/251: Add interactive test functions, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill d37519f54c 147/251: Clean up robot testing, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 9fa9b6eabf 148/251: Robot test all card types, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 500d1475c3 120/251: Add count entries test, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill c1c57adea9 133/251: Remove dormant-entry-count, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill a923ba2c90 145/251: Move exit-kind to slot, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 9555e487d4 143/251: Fix presentation-in-buffer, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 0286de5402 139/251: Remove unneed form, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill ba0a346583 125/251: Removed generated file, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill ffc04493f8 136/251: Remove more variables, ELPA Syncer, 2022/01/17