summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJSDurand <mmemmew@gmail.com>2024-06-05 17:06:10 +0800
committerJSDurand <mmemmew@gmail.com>2024-06-05 17:06:10 +0800
commitb4865c0a2a9dae628e7da36066def7fb96531dc9 (patch)
tree852586ede58e77a25c0cf10022bce6aebd337342
parent1b48e69e8182bcddefddb664435b04e5f3c47ac2 (diff)
dashboard: Add entry point for reading novels.
-rw-r--r--dashboard.el17
1 files changed, 14 insertions, 3 deletions
diff --git a/dashboard.el b/dashboard.el
index 8dc698f..393df59 100644
--- a/dashboard.el
+++ b/dashboard.el
@@ -175,9 +175,20 @@ common functionalities more conveniently."
(define-key m (vector ?c) #'dashboard-clear)
(define-key m (vector ?C) #'dashboard-org-capture)
(define-key m (vector ?p) #'project-switch-project)
- (define-key m (vector ?x) #'execute-extended-command))
+ (define-key m (vector ?x) #'execute-extended-command)
+ (define-key m (vector ?n) #'novel))
-;; load Org if not loaded already
+;;; Define novel command as a wrapper, if not already loaded
+
+(cond
+ ((functionp 'novel))
+ (t
+ (defun novel ()
+ "Load novel package."
+ (load "/Users/durand/elisp_packages/novel/novel.el"
+ nil nil t))))
+
+;;; load Org if not loaded already
(defmacro dashboard-preload (symbol file-to-load)
"Define a dispatch function for the symbol."
@@ -203,7 +214,7 @@ calls `%s' otherwise."
(dashboard-preload org-capture "org-conf.el")
(dashboard-preload org-store-link "org-conf.el")
-;; ibuffer clear
+;;; ibuffer clear
(defun dashboard-clear ()
"Run `durand-ibuffer-clear' while in the dashboard."