summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-02-22 14:19:47 +0200
committerThanos Apollo <[email protected]>2024-02-22 14:19:47 +0200
commit70d334a5119ce48b133c99b33a8d1ce3c661af0a (patch)
treec8f33dd2a7dd34137acf6a0ef8decf42d3b21773
parent2dabfcd2c0208af129a1cb40913a29320c150351 (diff)
basic: Refactor interactive input
- Use read-string-from-buffer - Use gnosis-hint-prompt - Use gnosis-prompt-tags--split
-rw-r--r--gnosis.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/gnosis.el b/gnosis.el
index e2af6a4..fcc4f88 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -541,12 +541,12 @@ Refer to `gnosis-add-note--basic' for more."
(let ((deck (gnosis--get-deck-name)))
(while (y-or-n-p (format "Add note of type `basic' to `%s' deck? " deck))
(gnosis-add-note--basic :deck deck
- :question (read-string "Question: ")
+ :question (read-string-from-buffer "Question: " "")
:answer (read-string "Answer: ")
- :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--double (&key deck question hint answer extra (image nil) tags (suspend 0) (second-image nil))
"Add Double type note.