From 79d7f34030d427dad6d7bca2bc825fa35ee8e94c Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Mon, 25 Dec 2023 17:32:16 +0200 Subject: gnosis-ad-note-mcq: Add key image with default value of nil image value would be the path of image inside gnosis-images-dir --- gnosis.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnosis.el b/gnosis.el index 30b90d5..357e596 100644 --- a/gnosis.el +++ b/gnosis.el @@ -140,7 +140,7 @@ Set SPLIT to t to split all input given." (gnosis--delete 'decks `(= name ,deck)) (message "Deleted deck %s" deck)) -(cl-defun gnosis-add-note-mcq (&key deck question choices correct-answer extra tags (suspend 0)) +(cl-defun gnosis-add-note-mcq (&key deck question choices correct-answer extra (image nil) tags (suspend 0)) "Create a NOTE with a list of multiple CHOICES. MCQ type consists of a main `QUESTION' that is displayed to the user. @@ -166,7 +166,7 @@ choice in the `CHOICES' list. Each note must correspond to one `DECK'. (gnosis--insert-into 'notes `([nil "mcq" ,question ,choices ,correct-answer ,tags ,(gnosis--get-deck-id deck)])) (gnosis--insert-into 'review `([nil ,gnosis-algorithm-ef ,gnosis-algorithm-ff ,gnosis-algorithm-interval])) (gnosis--insert-into 'review-log `([nil ,(gnosis-algorithm-date) ,(gnosis-algorithm-date) 0 ,suspend 0])) - (gnosis--insert-into 'extras `([nil ,extra nil]))) + (gnosis--insert-into 'extras `([nil ,extra ,image]))) (defun gnosis-add-note (type) "Create note as TYPE." -- cgit v1.2.3