summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-09-21 08:53:27 +0300
committerThanos Apollo <[email protected]>2024-09-21 08:53:27 +0300
commit17418b16f6fe6ac0b8e976f20c4f6fda42b4a025 (patch)
tree3e7e77043fb641eeea18db75359cf18a6f63638d
parent28b4067319bb10fc208c1066ef306779419a5a2b (diff)
New function: dashboard-enable-mode.
* Enables gnosis-dashboard-mode, when in a valid buffer.
-rw-r--r--gnosis-dashboard.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/gnosis-dashboard.el b/gnosis-dashboard.el
index 3b96348..8d06c31 100644
--- a/gnosis-dashboard.el
+++ b/gnosis-dashboard.el
@@ -383,6 +383,13 @@ When called with called with a prefix, unsuspend all notes of deck."
gnosis-dashboard--selected-ids nil)
(display-line-numbers-mode 0))
+(defun gnosis-dashboard-enable-mode ()
+ "Enable `gnosis-dashboard-mode'.
+
+This should only be enabled in a gnosis dashboard buffer."
+ (when (string= (buffer-name) gnosis-dashboard-buffer-name)
+ (gnosis-dashboard-mode)))
+
(cl-defun gnosis-dashboard--search (&optional dashboard-type (note-ids nil))
"Display gnosis dashboard.