From 7712ffb884cdf69b46869d303e4f012b0339d85a Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Tue, 28 Nov 2023 15:25:15 +0200 Subject: Add gnosis-mode --- gnosis.el | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/gnosis.el b/gnosis.el index 16b1987..fca6905 100644 --- a/gnosis.el +++ b/gnosis.el @@ -95,7 +95,7 @@ use it like this: (list :question (read-string "Question: ") :choices (gnosis--input-mcanswers) :correct-answer (string-to-number (read-string "Which is the correct answer? ")))) - (gnosis--insert-into 'qbank1 `([nil ,question ,choices ,correct-answer]))) + (gnosis--insert-into 'notes `([nil "mcq" ,question ,choices ,correct-answer 0 0]))) (defun gnosis-create-question (type) "Create question as TYPE." @@ -116,13 +116,12 @@ use it like this: (message "Correct!") (message "False")))) +;; testing (defun gnosis-test-buffer () "Create testing buffer." (interactive) (with-current-buffer (switch-to-buffer (get-buffer-create "*gnosis*")) - (gnosis--display-question 13) - (gnosis-review 13))) (setq-local minibuffer-history nil) (gnosis--display-question 1) (gnosis-review 1) @@ -138,4 +137,11 @@ use it like this: rev_log rev_score]))) +;; Gnosis mode +(define-derived-mode gnosis-mode special-mode "Gnosis" + "Gnosis Mode." + :interactive t + (display-line-numbers-mode 0) + :lighter " gnosis-mode") + ;;; gnosis.el ends here -- cgit v1.2.3