From 84003d231e2c8e38126aa0b92b3f75cb4dd91090 Mon Sep 17 00:00:00 2001 From: Jen-Chieh Date: Wed, 15 Jun 2022 13:15:38 +0800 Subject: [PATCH 1/4] docs: changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fc885659..097cb386 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,8 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how * Add functionality to delete items (#366) * Fix issue dashboard-banners-directory resolves with two slashes ("dashboard//banners") (GNU only?) (#367) * Add capability to remove item for agenda (#372) +* Add CI, activation test (#381) +* Fix dashboard not showing up in daemon mode (#382) ## 1.7.0 > Released Feb 21, 2020 From 9c84aa166edbdbb230467c4fadd0cc77fc7e8c1e Mon Sep 17 00:00:00 2001 From: Jen-Chieh Date: Wed, 15 Jun 2022 13:16:11 +0800 Subject: [PATCH 2/4] Fix dashboard not showing up in daemon mode --- dashboard.el | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/dashboard.el b/dashboard.el index ca4a701c..6941a6e2 100644 --- a/dashboard.el +++ b/dashboard.el @@ -381,16 +381,14 @@ Optional argument ARGS adviced function arguments." (defun dashboard-insert-startupify-lists () "Insert the list of widgets into the buffer." (interactive) - (let ((buffer-exists (buffer-live-p (get-buffer dashboard-buffer-name))) - (recentf-is-on (recentf-enabled-p)) + (let ((recentf-is-on (recentf-enabled-p)) (origial-recentf-list recentf-list) (dashboard-num-recents (or (cdr (assoc 'recents dashboard-items)) 0)) (max-line-length 0)) (when recentf-is-on (setq recentf-list (dashboard-subseq recentf-list dashboard-num-recents))) (when (or dashboard-force-refresh - (not (eq dashboard-buffer-last-width (window-width))) - (not buffer-exists)) + (not (eq dashboard-buffer-last-width (window-width)))) (setq dashboard-banner-length (window-width) dashboard-buffer-last-width dashboard-banner-length) (with-current-buffer (get-buffer-create dashboard-buffer-name) From ba73b3b7c6e2612f439376eacc1fbdbb356e0c9a Mon Sep 17 00:00:00 2001 From: Jen-Chieh Date: Wed, 15 Jun 2022 13:30:50 +0800 Subject: [PATCH 3/4] Improve test --- test/activate.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/activate.el b/test/activate.el index d574bb6a..70c13a5d 100644 --- a/test/activate.el +++ b/test/activate.el @@ -23,7 +23,8 @@ ;;; Code: (dashboard-setup-startup-hook) -(switch-to-buffer dashboard-buffer-name) + +(setq initial-buffer-choice (lambda () (get-buffer-create "*dashboard*"))) (message "Done activation test.") From d4bff4bca195fcfea5f06cdb85a26ed1ecb0e46b Mon Sep 17 00:00:00 2001 From: Jen-Chieh Date: Wed, 15 Jun 2022 13:41:37 +0800 Subject: [PATCH 4/4] docs: use get-buffer-create instead --- README.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.org b/README.org index bf399340..36c63b3c 100644 --- a/README.org +++ b/README.org @@ -59,7 +59,7 @@ In addition to the above, configure =initial-buffer-choice= to show Dashboard in frames created with =emacsclient -c= as follows: #+BEGIN_SRC elisp -(setq initial-buffer-choice (lambda () (get-buffer "*dashboard*"))) +(setq initial-buffer-choice (lambda () (get-buffer-create "*dashboard*"))) #+END_SRC * Configuration