From 98e0fd1247eba8ce65eae2da64511227a47f4f27 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Sat, 3 Aug 2024 18:47:31 +0300 Subject: New function: dashboard-suspend-note. * Suspend either selected-ids or note at point, depending on the value of selected-ids. --- gnosis-dashboard.el | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gnosis-dashboard.el b/gnosis-dashboard.el index a2ec5ce..8aa4a25 100644 --- a/gnosis-dashboard.el +++ b/gnosis-dashboard.el @@ -206,6 +206,15 @@ Optionally, use when using multiple months." (let ((id (or id (string-to-number (tabulated-list-get-id))))) (gnosis-edit-note id))) +(defun gnosis-dashboard-suspend-note () + "Suspend note." + (interactive) + (if gnosis-dashboard--selected-ids + (gnosis-dashboard-marked-suspend) + (gnosis-suspend-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