From 24fda0e02ffe14aabb7e6c69737c94dc384070a7 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Wed, 27 Dec 2023 10:56:18 +0200 Subject: Add gnosis-add-note-basic --- gnosis.el | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'gnosis.el') diff --git a/gnosis.el b/gnosis.el index e843abc..54089ea 100644 --- a/gnosis.el +++ b/gnosis.el @@ -238,6 +238,17 @@ choice in the `CHOICES' list. Each note must correspond to one `DECK'. (setf tags 'untagged))) (gnosis-add-note-fields deck "mcq" question choices correct-answer extra tags suspend image)) +(cl-defun gnosis-add-note-basic (&key deck question hint answer extra (image nil) tags (suspend 0)) + "Add basic type note." + (interactive + (list :deck (gnosis--get-deck-name) + :question (read-string "Question: ") + :hint (read-string "Hint: ") + :answer (read-string "Answer: ") + :extra (read-string "Extra: ") + :tags (gnosis--prompt "Tags" t t))) + (gnosis-add-note-fields deck "basic" question hint answer extra tags suspend image)) + (cl-defun gnosis-add-note-cloze (&key deck note tags (suspend 0) extra (image nil)) "Add cloze type note." (interactive (list :deck (gnosis--get-deck-name) @@ -256,7 +267,7 @@ choice in the `CHOICES' list. Each note must correspond to one `DECK'. (pcase type ("MCQ" (while (y-or-n-p "Add MCQ note? ") (call-interactively 'gnosis-add-note-mcq))) ("Cloze" (while (y-or-n-p "Add cloze note? ") (call-interactively 'gnosis-add-note-cloze))) - ("Basic" (message "Not ready yet.")) + ("Basic" (while (y-or-n-p "Add basic-note? ") (call-interactively 'gnosis-add-note-basic))) (_ (message "No such type.")))) (defun gnosis-mcq-answer (id) -- cgit v1.2.3