summaryrefslogtreecommitdiff
path: root/gnosis.el
diff options
context:
space:
mode:
Diffstat (limited to 'gnosis.el')
-rw-r--r--gnosis.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/gnosis.el b/gnosis.el
index 3d1b50a..67ed0fd 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -415,6 +415,13 @@ Set SPLIT to t to split all input given."
(gnosis--delete 'decks `(= id ,id))
(message "Deleted deck `%s'" deck-name))))
+(cl-defun gnosis-suspend-note (id)
+ "Suspend note with ID."
+ (let ((suspended (= (gnosis-get 'suspend 'review-log `(= id ,id)) 1)))
+ (when (y-or-n-p (if suspended "Unsuspend note? " "Suspend note? "))
+ (if suspended
+ (gnosis-update 'review-log '(= suspend 0) `(= id ,id))
+ (gnosis-update 'review-log '(= suspend 1) `(= id ,id))))))
(cl-defun gnosis-suspend-deck (&optional (deck (gnosis--get-deck-id)))
"Suspend all note(s) with DECK id.