From d641ce4b86bba8cd3c9113690a5ad46f4d8bd5dc Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Sat, 3 Aug 2024 18:48:36 +0300 Subject: New function: dashboard-delete. * Delete note at point. --- gnosis-dashboard.el | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gnosis-dashboard.el b/gnosis-dashboard.el index 8aa4a25..1503a67 100644 --- a/gnosis-dashboard.el +++ b/gnosis-dashboard.el @@ -215,6 +215,14 @@ Optionally, use when using multiple months." (gnosis-dashboard-output-notes gnosis-dashboard-note-ids) (revert-buffer t t t))) +(defun gnosis-dashboard-delete () + "Delete note." + (interactive) + (if gnosis-dashboard--selected-ids + (gnosis-dashboard-marked-delete) + (gnosis-delete-note (string-to-number (tabulated-list-get-id))) + (gnosis-dashboard-output-notes gnosis-dashboard-note-ids) + (revert-buffer t t t))) (defun gnosis-dashboard-output-notes (note-ids) "Return NOTE-IDS contents on gnosis dashboard." (cl-assert (listp note-ids) t "`note-ids' must be a list of note ids.") -- cgit v1.2.3