summaryrefslogtreecommitdiff
path: root/gnosis.el
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2023-12-28 12:30:40 +0200
committerThanos Apollo <[email protected]>2023-12-28 12:30:40 +0200
commit735a103b79d039d50cb5173da90444414273c0cb (patch)
tree18399882535d1716550ed10a7f56f3be516b674d /gnosis.el
parentfad72aabb29f76cfa8a527177dc191001b5d606a (diff)
Add gnosis-suspend-tag
Diffstat (limited to 'gnosis.el')
-rw-r--r--gnosis.el9
1 files changed, 8 insertions, 1 deletions
diff --git a/gnosis.el b/gnosis.el
index 60ff17e..94d4260 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -237,13 +237,20 @@ When called with a prefix, unsuspends all notes in deck."
(cl-loop for note in notes
do (gnosis-update 'review-log `(= suspend ,suspend) `(= id ,(car note))))))
+(defun gnosis-suspend-tag ()
+ "Suspend all note(s) with tag."
+ (let ((notes (gnosis-select-by-tag (gnosis-prompt-tag)))
+ (suspend (if current-prefix-arg 0 1)))
+ (cl-loop for note in notes
+ do (gnosis-update 'review-log `(= suspend ,suspend) `(= id ,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."))
+ ("Tag" (gnosis-suspend-tag))
(_ (message "Not ready yet.")))))