Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(daemon): Minor improvements, update doc for get-buffer-create instead #382

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.org
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 2 additions & 4 deletions dashboard.el
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion test/activate.el
Original file line number Diff line number Diff line change
Expand Up @@ -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.")

Expand Down