summaryrefslogtreecommitdiff
path: root/gnosis.el
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2023-12-28 13:03:27 +0200
committerThanos Apollo <[email protected]>2023-12-28 13:03:27 +0200
commite02340c37475c14aaedd3b075183b952df04f294 (patch)
treeee90369060c2ad70355da535537a675ccfb19fe4 /gnosis.el
parent735a103b79d039d50cb5173da90444414273c0cb (diff)
gnosis-review-note: Check if note is suspended
Diffstat (limited to 'gnosis.el')
-rw-r--r--gnosis.el17
1 files changed, 10 insertions, 7 deletions
diff --git a/gnosis.el b/gnosis.el
index 94d4260..2cd5425 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -574,13 +574,16 @@ If user-input is equal to CLOZE, return t."
(gnosis-display--extra id))
(defun gnosis-review-note (id)
- "Start review for note with value of id ID."
- (let ((type (gnosis-get 'type 'notes `(= id ,id))))
- (pcase type
- ("mcq" (gnosis-review-mcq id))
- ("basic" (gnosis-review-basic id))
- ("cloze" (gnosis-review-cloze id))
- (_ (error "Malformed note type")))))
+ "Start review for note with value of id ID, if note is unsuspended."
+ (cond ((gnosis-suspended-p id)
+ (message "Note is suspended."))
+ (t
+ (let ((type (gnosis-get 'type 'notes `(= id ,id))))
+ (pcase type
+ ("mcq" (gnosis-review-mcq id))
+ ("basic" (gnosis-review-basic id))
+ ("cloze" (gnosis-review-cloze id))
+ (_ (error "Malformed note type")))))))
(defun gnosis-review-all-with-tags ()
"Review all note(s) with specified tag(s)."