From e02340c37475c14aaedd3b075183b952df04f294 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Thu, 28 Dec 2023 13:03:27 +0200 Subject: gnosis-review-note: Check if note is suspended --- gnosis.el | 17 ++++++++++------- 1 file 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)." -- cgit v1.2.3