summaryrefslogtreecommitdiff
path: root/gnosis.el
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-02-22 14:20:52 +0200
committerThanos Apollo <[email protected]>2024-02-22 14:20:52 +0200
commit4a2d652cd21baa85b2d2b4f02e8e14cb00e82b72 (patch)
treefae934e1ff960816f9e1037084100efb38da43ab /gnosis.el
parent70d334a5119ce48b133c99b33a8d1ce3c661af0a (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.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/gnosis.el b/gnosis.el
index fcc4f88..ab4cd3e 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -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))