diff options
author | Thanos Apollo <[email protected]> | 2023-12-25 05:08:05 +0200 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2023-12-25 07:02:00 +0200 |
commit | 83caf73c16a195d4507be3a14f957baa34378890 (patch) | |
tree | 5fc14b7361a471cf776113a17dda5aaba86e57e4 | |
parent | 891eae20ea8cff9bc03fb1d355cb2204edd3408e (diff) |
Add gnosis-display--extra
-rw-r--r-- | gnosis.el | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -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.")) |