From cd0608d19e61d33e39379ca68512b57798a4bec3 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Sat, 3 Aug 2024 19:00:27 +0300 Subject: New function: dashboard-decks-suspend-deck. * Suspend currently selected deck notes. --- gnosis-dashboard.el | 10 ++++++++++ 1 file changed, 10 insertions(+) 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) -- cgit v1.2.3