From 30cdfb69884b002c8523b0ae0025b53fbd41752f Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Thu, 11 Apr 2024 10:27:20 +0300 Subject: dashboard: Adjust for output buffer - gnosis-dashboard-output-decks & notes functions are the ones that should pop to a new buffer. - gnosis-dashboard should only handle note-id collection --- gnosis.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gnosis.el b/gnosis.el index 1f3a7ae..ad85899 100644 --- a/gnosis.el +++ b/gnosis.el @@ -1633,6 +1633,8 @@ DECK: boolean value, t to specify notes from deck." (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.") + (pop-to-buffer "*gnosis-dashboard*") + (gnosis-dashboard-mode) (setf tabulated-list-format [("Main" 30 t) ("Options" 20 t) ("Answer" 25 t) @@ -1676,6 +1678,8 @@ DECK: boolean value, t to specify notes from deck." (defun gnosis-dashboard-output-decks () "Return deck contents for gnosis dashboard." + (pop-to-buffer "*gnosis-dashboard*") + (gnosis-dashboard-mode) (setq tabulated-list-format [("Name" 15 t) ("failure-factor" 15 t) ("ef-increase" 15 t) @@ -1742,8 +1746,6 @@ DASHBOARD-TYPE: either 'Notes' or 'Decks' to display the respective dashboard." '((?n "notes") (?d "decks") (?t "tags"))))))) - (pop-to-buffer "*gnosis-dashboard*") - (gnosis-dashboard-mode) (if note-ids (gnosis-dashboard-output-notes note-ids) (pcase dashboard-type ("notes" (gnosis-dashboard-output-notes (gnosis-collect-note-ids))) -- cgit v1.2.3