summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-08-03 19:12:05 +0300
committerThanos Apollo <[email protected]>2024-08-03 19:12:05 +0300
commitf97cb3bc80d08e0c39bd768091974e5cb3a28e2d (patch)
tree4a9e262cd9090c89ebb991f29ba7a108e4f636b4
parent3a156f80a897408a72e3e291e9262c3b2adaf844 (diff)
New function: dashboard-marked-delete.
* Delete all selected note ids.
-rw-r--r--gnosis-dashboard.el8
1 files changed, 8 insertions, 0 deletions
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"