summaryrefslogtreecommitdiff
path: root/gnosis-dashboard.el
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-08-03 18:47:31 +0300
committerThanos Apollo <[email protected]>2024-08-03 18:47:31 +0300
commit98e0fd1247eba8ce65eae2da64511227a47f4f27 (patch)
tree72990c5661ca096ff936e82c4eb296ef4666eee0 /gnosis-dashboard.el
parente5cd26d3020b3b8ca1957137f2fd4d3de1565703 (diff)
New function: dashboard-suspend-note.
* Suspend either selected-ids or note at point, depending on the value of selected-ids.
Diffstat (limited to 'gnosis-dashboard.el')
-rw-r--r--gnosis-dashboard.el9
1 files changed, 9 insertions, 0 deletions
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.")