summaryrefslogtreecommitdiff
path: root/gnosis.el
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-02-16 23:59:06 +0200
committerThanos Apollo <[email protected]>2024-02-16 23:59:06 +0200
commit9aa36eb0e6d612542cba583ae821c7dd143ddfb0 (patch)
tree4ce4c40d7a72c0f1351f13ce93caa4bee5bbc465 /gnosis.el
parent2c5709390330fbf7a0d01a0d59e76af3e673301d (diff)
Add custom gnosis-mcq-display-choices
When t, display choices for mcq notes during review. Users that use a completion framework like ivy/helm/vertico may want to set this to nil, as the choices will be displayed in the completion framework's minibuffer.
Diffstat (limited to 'gnosis.el')
-rw-r--r--gnosis.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/gnosis.el b/gnosis.el
index da20d38..0a21a11 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -69,6 +69,15 @@ between two strings to consider them as similar."
:type 'boolean
:group 'gnosis)
+(defcustom gnosis-mcq-display-choices t
+ "When t, display choices for mcq notes during review.
+
+Users that use a completion framework like ivy/helm/vertico may want
+to set this to nil, as the choices will be displayed in the completion
+framework's minibuffer."
+ :type 'boolean
+ :group 'gnosis)
+
(defcustom gnosis-auto-push-command "push"
"Git shell command to run at the end of a review session.
@@ -930,6 +939,8 @@ SUCCESS is a boolean value, t for success, nil for failure."
"Display multiple choice answers for question ID."
(gnosis-display-image id)
(gnosis-display-question id)
+ (when gnosis-mcq-display-choices
+ (gnosis-display-mcq-options id))
(let* ((choices (gnosis-get 'options 'notes `(= id ,id)))
(answer (nth (- (gnosis-get 'answer 'notes `(= id ,id)) 1) choices))
(user-choice (gnosis-mcq-answer id)))