From 9e679fe36adda32978ae0aaf15e41afbca024be4 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Tue, 2 Apr 2024 19:19:11 +0300 Subject: gnosis-dashboard-edit-note: Add dashboard as arg Specify as arg dashboard to return to after editing. --- gnosis.el | 18 ++++++++---------- 1 file 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 () -- cgit v1.2.3