From f97cb3bc80d08e0c39bd768091974e5cb3a28e2d Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Sat, 3 Aug 2024 19:12:05 +0300 Subject: New function: dashboard-marked-delete. * Delete all selected note ids. --- gnosis-dashboard.el | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gnosis-dashboard.el') diff --git a/gnosis-dashboard.el b/gnosis-dashboard.el index 3b1a17e..9b6b04b 100644 --- a/gnosis-dashboard.el +++ b/gnosis-dashboard.el @@ -467,6 +467,14 @@ DASHBOARD-TYPE: either 'Notes' or 'Decks' to display the respective dashboard." (remove-overlays nil nil 'gnosis-mark t) (message "All items unmarked"))) +(defun gnosis-dashboard-marked-delete () + "Delete marked note entries." + (interactive) + (when (y-or-n-p "Delete selected notes?") + (cl-loop for note in gnosis-dashboard--selected-ids + do (gnosis-delete-note (string-to-number note) t)) + (gnosis-dashboard-return))) + (transient-define-prefix gnosis-dashboard-menu () "Transient buffer for gnosis dashboard interactions." [["Actions" -- cgit v1.2.3