summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2023-12-25 07:06:05 +0200
committerThanos Apollo <[email protected]>2023-12-25 07:06:05 +0200
commit64a848cd000572caebf7068fe17728e6c0c3bf53 (patch)
tree4a0a0aec992a5bc6a63c0108f261e83a2ea53620
parentb30a3011833c2c175743a761f72f67c592a7726a (diff)
Update gnosis-review with gnosis-display & remove unnecessary delays
-rw-r--r--gnosis.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/gnosis.el b/gnosis.el
index 1fb7814..0fb7ca8 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -111,7 +111,7 @@ Set DOWNCASE to t to downcase all input given.
Set SPLIT to t to split all input given."
(cl-loop with input = nil
for response = (read-string (concat prompt " (q for quit): "))
- do (if downcase (setq response (downcase response)))
+ do (if downcase (setf response (downcase response)))
for response-parts = (if split (split-string response " ") (list response))
if (member "q" response-parts) return (nreverse input)
do (cl-loop for part in response-parts
@@ -162,7 +162,7 @@ choice in the `CHOICES' list. Each note must correspond to one `DECK'.
(cond ((or (not (numberp correct-answer)) (equal correct-answer 0))
(error "Correct answer value must be the index number of the correct answer"))
((null tags)
- (setq tags 'untagged)))
+ (setf tags 'untagged)))
(gnosis--insert-into 'notes `([nil "mcq" ,question ,choices ,correct-answer ,tags ,(gnosis--get-deck-id deck)]))
(gnosis--insert-into 'review `([nil ,gnosis-algorithm-ef ,gnosis-algorithm-ff ,gnosis-algorithm-interval]))
(gnosis--insert-into 'review-log `([nil ,(gnosis-algorithm-date) ,(gnosis-algorithm-date) 0 ,suspend 0]))
@@ -241,8 +241,8 @@ Returns a list of the form (ef-increase ef-decrease ef)."
(progn (gnosis-review--success id)
(message "Correct!"))
(message "False")))
- (gnosis-display--extra id)
- (sit-for 0.5))
+ (gnosis-display--correct-answer-mcq id)
+ (gnosis-display--extra id))
(defun gnosis-review-note (id)
"Start review for note with value of id ID."