summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2023-11-28 15:25:15 +0200
committerThanos Apollo <[email protected]>2023-11-28 15:25:15 +0200
commit7712ffb884cdf69b46869d303e4f012b0339d85a (patch)
tree061ed7f41a1047b9756b86648fbaa6c640405492
parent6ae90f432a37bbe831814b328c6567bb58a597a1 (diff)
Add gnosis-mode
-rw-r--r--gnosis.el12
1 files 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