Skip to content
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

Fix init-info reporting wrong `emacs-init-time' #330

Merged
merged 1 commit into from
Sep 28, 2021

Conversation

andrewhr
Copy link
Contributor

This patch fixes an issue where the init info doesn't show the correct value of emacs-init-time.

The cause is due the defcustom default value being computed at whatever time this package is loaded, which not necessarily represent the final startup time. As example, on my local use-package based setup it reports something around 0.6 seconds, while manually calling M-x emacs-init-time does say 2.5 seconds.

The fix is wrapping the default message inside a lambda, to defer computing until render time. This change should keep old behavior, in case any user override dashboard-init-info with some fixed string.

This patch fixes an issue where the init info doesn't show the correct
value of `emacs-init-time`.

The cause is due the `defcustom` default value being computed at
whatever time this package is loaded, which not necessarily represent
the final startup time. As example, on my local use-package based setup
it reports something around 0.6 seconds, while manually calling
`M-x emacs-init-time` does say 2.5 seconds.

The fix is wrapping the default message inside a lambda, to defer
computing until render time. This change should keep old behaviour,
in case any user override `dashboard-init-info` with some fixed string.
@jcs090218
Copy link
Member

Thanks!

@jcs090218 jcs090218 merged commit 8cfe3c6 into emacs-dashboard:master Sep 28, 2021
@andrewhr andrewhr deleted the lazy-init-info branch September 28, 2021 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants