summaryrefslogtreecommitdiff
path: root/gnosis-dashboard.el
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-08-03 19:00:27 +0300
committerThanos Apollo <[email protected]>2024-08-03 19:00:27 +0300
commitcd0608d19e61d33e39379ca68512b57798a4bec3 (patch)
treecad5b73811fbeb770eab76227a1feb73181c06de /gnosis-dashboard.el
parent2146a0286abf2b6434bfc25cac5707617a27f677 (diff)
New function: dashboard-decks-suspend-deck.
* Suspend currently selected deck notes.
Diffstat (limited to 'gnosis-dashboard.el')
-rw-r--r--gnosis-dashboard.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/gnosis-dashboard.el b/gnosis-dashboard.el
index bb86dd0..c3dd1d1 100644
--- a/gnosis-dashboard.el
+++ b/gnosis-dashboard.el
@@ -365,6 +365,16 @@ DASHBOARD: Dashboard to return to after editing."
(let ((id (tabulated-list-get-id)))
(gnosis-edit-deck (string-to-number id))))
+(defun gnosis-dashboard-decks-suspend-deck (&optional deck-id)
+ "Suspend notes for DECK-ID.
+
+When called with called with a prefix, unsuspend all notes of deck."
+ (interactive)
+ (let ((deck-id (or deck-id (string-to-number (tabulated-list-get-id)))))
+ (gnosis-suspend-deck deck-id)
+ (gnosis-dashboard-output-decks)
+ (revert-buffer t t t)))
+
(defvar-keymap gnosis-dashboard-mode-map
:doc "gnosis-dashboard keymap"
"q" #'quit-window)