diff options
author | Thanos Apollo <[email protected]> | 2023-12-28 04:26:29 +0200 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2023-12-28 04:44:28 +0200 |
commit | 0c5d778ef8bc805ce8968a7512599b9d43e244d1 (patch) | |
tree | d53733e2a22f062b194d5f706abda3d7d2166944 | |
parent | 86a1e38c677b0a94ab9679d210c5ccf547dd1699 (diff) |
cloze: Use options as hint & display them for cloze type notes
-rw-r--r-- | gnosis.el | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -288,13 +288,13 @@ choice in the `CHOICES' list. Each note must correspond to one `DECK'. `SUSPEND' is a binary value, where 1 is for suspend." (interactive (list :deck (gnosis--get-deck-name) :note (read-string "Cloze note: ") + :hint (read-string "Hint: ") :extra (read-string "Extra: ") :tags (gnosis-prompt-tag))) (let ((notags-note (gnosis-cloze-remove-tags note)) (clozes (gnosis-cloze-extract-answers note))) (cl-loop for cloze in clozes - ;; TODO: OPTIONS need to be hints - do (gnosis-add-note-fields deck "cloze" notags-note "" cloze extra tags suspend image)))) + do (gnosis-add-note-fields deck "cloze" notags-note hint cloze extra tags suspend image)))) (defun gnosis-add-note (type) "Create note as TYPE." @@ -488,9 +488,11 @@ If user-input is equal to CLOZE, return t." (defun gnosis-review-cloze (id) "Review cloze type note for ID." (let* ((main (gnosis-get 'main 'notes `(= id ,id))) - (clozes (gnosis-get 'answer 'notes `(= id ,id)))) + (clozes (gnosis-get 'answer 'notes `(= id ,id))) + (hint (gnosis-get 'options 'notes `(= id ,id)))) (gnosis-display--image id) (gnosis-display--cloze-sentence main clozes) + (gnosis-display--hint hint) (cl-loop for cloze in clozes do (let ((input (gnosis-review-cloze--input cloze))) (when (equal (car input) nil) |