summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-08-04 08:27:39 +0300
committerThanos Apollo <[email protected]>2024-08-04 08:27:39 +0300
commite24fd3159c0b1ec8b796554c96d300cb3935dbb2 (patch)
tree7a34be941ae8be17ddf4897a4b15710b6caadc32
parentba119ccb4d4cf07dc30e4a99bc9bef1ded8827af (diff)
New function: dashboard-suspend-tag.
* Toggle suspend for all notes of tag. * Bind it to "s" under dashboard-tags-mode-map.
-rw-r--r--gnosis-dashboard.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/gnosis-dashboard.el b/gnosis-dashboard.el
index 473238b..1dcf9fb 100644
--- a/gnosis-dashboard.el
+++ b/gnosis-dashboard.el
@@ -294,6 +294,15 @@ Optionally, use when using multiple months."
(new-tags (cl-substitute new-tag tag tags :test #'string-equal)))
(gnosis-update 'notes `(= tags ',new-tags) `(= id ,note))))))
+(defun gnosis-dashboard-suspend-tag (&optional tag)
+ "Suspend notes of TAG."
+ (interactive)
+ (let* ((tag (or tag (tabulated-list-get-id)))
+ (notes (gnosis-get-tag-notes tag)))
+ (when (y-or-n-p "Toggle SUSPEND for tagged notes?")
+ (cl-loop for note in notes
+ do (gnosis-suspend-note note t)))))
+
(defun gnosis-dashboard-tag-view-notes (&optional tag)
"View notes for TAG."
(interactive)
@@ -303,6 +312,7 @@ Optionally, use when using multiple months."
(defvar-keymap gnosis-dashboard-tags-mode-map
"RET" #'gnosis-dashboard-tag-view-notes
"e" #'gnosis-dashboard-rename-tag
+ "s" #'gnosis-dashboard-suspend-tag
"r" #'gnosis-dashboard-rename-tag
"g" #'gnosis-dashboard-return)