summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2023-12-28 08:13:22 +0200
committerThanos Apollo <[email protected]>2023-12-28 08:13:22 +0200
commitfad72aabb29f76cfa8a527177dc191001b5d606a (patch)
tree0e518e567b4d947c5852c3963f1f55a33fcce802
parentcc1b398063582db2c6686c20caa18c4e9dda90c0 (diff)
Add gnosis-suspend
Interactive function to suspend notes with specified values e.g either based on tags or decks.
-rw-r--r--gnosis.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/gnosis.el b/gnosis.el
index 720076c..60ff17e 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -236,6 +236,17 @@ When called with a prefix, unsuspends all notes in deck."
(suspend (if current-prefix-arg 0 1)))
(cl-loop for note in notes
do (gnosis-update 'review-log `(= suspend ,suspend) `(= id ,(car note))))))
+
+(defun gnosis-suspend ()
+ "Suspend note(s) with specified values."
+ (interactive)
+ (let ((item (completing-read "Suspend by: " '("Deck" "Tag"))))
+ (pcase item
+ ("Deck" (gnosis-suspend-deck))
+ ("Tag" (message "Not ready yet."))
+ (_ (message "Not ready yet.")))))
+
+
(defun gnosis-add-note-fields (deck type main options answer extra tags suspend image)
"Add fields for new note.