summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-04-02 19:19:11 +0300
committerThanos Apollo <[email protected]>2024-04-02 19:19:11 +0300
commit9e679fe36adda32978ae0aaf15e41afbca024be4 (patch)
treecf42356a8040fe79218192860703654bcfe7a2e7
parenta3a77db05280e5bd80cf7b28cf5a75eaacbfe729 (diff)
gnosis-dashboard-edit-note: Add dashboard as arg
Specify as arg dashboard to return to after editing.
-rw-r--r--gnosis.el18
1 files changed, 8 insertions, 10 deletions
diff --git a/gnosis.el b/gnosis.el
index 08523ba..28a7b20 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -1680,17 +1680,15 @@ DECK: boolean value, t to specify notes from deck."
(string-to-number (tabulated-list-get-id)))
(gnosis-dashboard-output-decks)
(revert-buffer t t t))))
-;; (local-set-key (kbd "d") #'(lambda () (interactive)
-;; (gnosis-delete-deck
-;; (string-to-number (tabulated-list-get-id)))
-;; (gnosis-dashboard-output-decks)
-;; (revert-buffer t t t))))
-
-(defun gnosis-dashboard-edit-note ()
- "Get note id from tabulated list and edit it."
+
+(defun gnosis-dashboard-edit-note (&optional dashboard)
+ "Get note id from tabulated list and edit it.
+
+DASHBOARD: Dashboard to return to after editing."
(interactive)
- (let ((id (tabulated-list-get-id)))
- (gnosis-edit-note (string-to-number id))
+ (let ((id (tabulated-list-get-id))
+ (dashboard (or dashboard "Notes")))
+ (gnosis-edit-note (string-to-number id) nil dashboard)
(message "Editing note with id: %s" id)))
(defun gnosis-dashboard-edit-deck ()