diff options
author | Thanos Apollo <[email protected]> | 2023-12-28 08:13:09 +0200 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2023-12-28 08:13:09 +0200 |
commit | cc1b398063582db2c6686c20caa18c4e9dda90c0 (patch) | |
tree | 05bfdd1f7b754583e1465b18083b6c899bd1032f /gnosis.el | |
parent | ac7a0b6b084b5eafab352b0cc77e15165ad894cc (diff) |
Add gnosis-suspend-deck
Diffstat (limited to 'gnosis.el')
-rw-r--r-- | gnosis.el | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -227,6 +227,15 @@ Set SPLIT to t to split all input given." (gnosis--delete 'decks `(= name ,deck)) (message "Deleted deck %s" deck)) +(defun gnosis-suspend-deck (&optional deck) + "Suspend all note(s) with DECK id. + +When called with a prefix, unsuspends all notes in deck." + (unless deck (setf deck (gnosis--get-deck-id))) + (let ((notes (gnosis-select 'id 'notes `(= deck-id ,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-add-note-fields (deck type main options answer extra tags suspend image) "Add fields for new note. |