diff options
author | Thanos Apollo <[email protected]> | 2024-02-22 13:50:23 +0200 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2024-02-22 13:50:23 +0200 |
commit | b374ab4f4e91f6beb6763be908bdf542e0ee3374 (patch) | |
tree | 1e69b54a444258e31c40fffc609b3722078fbefd | |
parent | f00f5846b954a49e1daa3abfb041427157c8ee92 (diff) |
cloze: Refactor creation of cloze type notes
- Use read-string-from-buffer for note & extra
- Use gnosis-hint-prompt
- Use gnosis-prompt-tags--split for tag input
-rw-r--r-- | gnosis.el | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -678,11 +678,14 @@ See `gnosis-add-note--cloze' for more reference." (let ((deck (gnosis--get-deck-name))) (while (y-or-n-p (format "Add note of type `cloze' to `%s' deck? " deck)) (gnosis-add-note--cloze :deck deck - :note (read-string "Question: ") - :hint (gnosis-hint-prompt gnosis-previous-hint) - :extra (read-string "Extra: ") + :note (read-string-from-buffer "Cloze questions are formatted like this:\{c1:Cyproheptadine} is a(n) {c2:5-HT2} receptor antagonist used to treat {c2:serotonin syndrome} + +- For each `cX`-tag there will be created a cloze type note, the above + example creates 2 cloze type notes." "") + :hint (gnosis-hint-prompt gnosis-previous-note-hint) + :extra (read-string-from-buffer "Extra" "") :image (gnosis-select-image) - :tags (gnosis-tag-prompt))))) + :tags (gnosis-prompt-tags--split gnosis-previous-note-tags))))) ;;;###autoload (defun gnosis-add-note (type) |