summaryrefslogtreecommitdiff
path: root/gnosis.el
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2023-12-25 05:08:05 +0200
committerThanos Apollo <[email protected]>2023-12-25 07:02:00 +0200
commit83caf73c16a195d4507be3a14f957baa34378890 (patch)
tree5fc14b7361a471cf776113a17dda5aaba86e57e4 /gnosis.el
parent891eae20ea8cff9bc03fb1d355cb2204edd3408e (diff)
Add gnosis-display--extra
Diffstat (limited to 'gnosis.el')
-rw-r--r--gnosis.el12
1 files changed, 9 insertions, 3 deletions
diff --git a/gnosis.el b/gnosis.el
index 54f08a9..025d9b7 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -81,8 +81,13 @@ Example:
(switch-to-buffer
(get-buffer-create "*gnosis*"))
(erase-buffer)
- (fill-paragraph (insert question))
- (sit-for 0.3))))
+ (fill-paragraph (insert question)))))
+
+(defun gnosis-display--extra (id)
+ "Display extra information for note ID."
+ (let ((extras (gnosis-get 'extra-notes 'extras `(= id ,id))))
+ (with-current-buffer (switch-to-buffer (get-buffer-create "*gnosis*"))
+ (fill-paragraph (insert (concat "\n\n" extras))))))
(cl-defun gnosis--prompt (prompt &optional (downcase nil) (split nil))
"PROMPT user for input until `q' is given.
@@ -223,12 +228,13 @@ 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))
(defun gnosis-review-note (id)
"Start review for note with value of id ID."
(let ((type (gnosis-get 'type 'notes `(= id id))))
- (gnosis--display-question id)
+ (gnosis-display--question id)
(pcase type
("mcq" (gnosis-review-mcq id))
("basic" (message "Not Ready yet."))