diff options
author | Thanos Apollo <[email protected]> | 2024-01-10 08:46:33 +0200 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2024-01-10 08:46:33 +0200 |
commit | f486d7c9ca080931e096e7b0059313cf5ed0a00b (patch) | |
tree | 3347876a51f8867377f6781d4087c0f886bad77f /gnosis.el | |
parent | 859278628cce072e7ce5cc00d1d7895d926565e0 (diff) |
Redo gnosis-suspend-note
Use cl-defun and add optional value for unsuspend, this function
should also be used to unsuspend notes
Diffstat (limited to 'gnosis.el')
-rw-r--r-- | gnosis.el | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -334,9 +334,12 @@ Set SPLIT to t to split all input given." (gnosis--delete 'decks `(= name ,deck)) (message "Deleted deck %s" deck)) -(defun gnosis-suspend-note (id) - "Suspend note with ID." - (gnosis-update 'review-log '(= suspend 1) `(= id ,id))) +;; TODO: Redo this as a single function +(cl-defun gnosis-suspend-note (id &optional (suspend 1)) + "Suspend note with ID. + +SUSPEND: 1 to suspend, 0 to unsuspend." + (gnosis-update 'review-log `(= suspend ,suspend) `(= id ,id))) (cl-defun gnosis-suspend-deck (&optional (deck (gnosis--get-deck-id))) "Suspend all note(s) with DECK id. |