diff options
author | Thanos Apollo <[email protected]> | 2024-02-22 14:20:52 +0200 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2024-02-22 14:20:52 +0200 |
commit | 4a2d652cd21baa85b2d2b4f02e8e14cb00e82b72 (patch) | |
tree | fae934e1ff960816f9e1037084100efb38da43ab /gnosis.el | |
parent | 70d334a5119ce48b133c99b33a8d1ce3c661af0a (diff) |
y-or-n: Refactor interactive input
- Use read-string-from-buffer
- Use gnosis-hint-prompt
- Use gnosis-prompt-tags--split
Diffstat (limited to 'gnosis.el')
-rw-r--r-- | gnosis.el | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -604,12 +604,12 @@ refer to `gnosis-add-note--y-or-n' for more information about keyword values." (let ((deck (gnosis--get-deck-name))) (while (y-or-n-p (format "Add note of type `y-or-n' to `%s' deck? " deck)) (gnosis-add-note--y-or-n :deck deck - :question (read-string "Question: ") + :question (read-string-from-buffer "Question: " "") :answer (read-char-choice "Answer: [y] or [n]? " '(?y ?n)) - :hint (gnosis-hint-prompt gnosis-previous-hint) - :extra (read-string "Extra: ") + :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))))) (cl-defun gnosis-add-note--cloze (&key deck note hint tags (suspend 0) extra (image nil) (second-image nil)) |