From 4a2d652cd21baa85b2d2b4f02e8e14cb00e82b72 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Thu, 22 Feb 2024 14:20:52 +0200 Subject: y-or-n: Refactor interactive input - Use read-string-from-buffer - Use gnosis-hint-prompt - Use gnosis-prompt-tags--split --- gnosis.el | 8 ++++---- 1 file 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)) -- cgit v1.2.3