summaryrefslogtreecommitdiff
path: root/gnosis-dashboard.el
diff options
context:
space:
mode:
Diffstat (limited to 'gnosis-dashboard.el')
-rw-r--r--gnosis-dashboard.el11
1 files changed, 10 insertions, 1 deletions
diff --git a/gnosis-dashboard.el b/gnosis-dashboard.el
index 1dcf9fb..efc50fe 100644
--- a/gnosis-dashboard.el
+++ b/gnosis-dashboard.el
@@ -294,6 +294,14 @@ 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-rename-deck (&optional deck-id new-name)
+ "Rename deck where DECK-ID with NEW-NAME."
+ (interactive)
+ (let ((deck-id (or deck-id (string-to-number (tabulated-list-get-id))))
+ (new-name (or new-name (read-string "New deck name: "))))
+ (gnosis-update 'decks `(= name ,new-name) `(= id ,deck-id))
+ (gnosis-dashboard-output-decks)))
+
(defun gnosis-dashboard-suspend-tag (&optional tag)
"Suspend notes of TAG."
(interactive)
@@ -346,7 +354,8 @@ Optionally, use when using multiple months."
collect (format "%s" item)))
(defvar-keymap gnosis-dashboard-decks-mode-map
- "e" #'gnosis-dashboard-edit-deck
+ "e" #'gnosis-dashboard-rename-deck
+ "r" #'gnosis-dashboard-rename-deck
"a" #'gnosis-dashboard-decks-add
"s" #'gnosis-dashboard-decks-suspend-deck
"d" #'gnosis-dashboard-decks-delete