From 07f88f94eab66ac84a1a82d685845534ea4ce310 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 30 Jul 2024 17:37:59 -0400 Subject: [PATCH] fix: improve startup error message Showing `user-init-file` in the startup message seems more confusing than helpful, especially to beginners, as it's not a file they can (or should) be editing to fix whatever caused the error. Plus, its value could be `t` if the error happens late enough in the startup process, which is even less helpful. --- lisp/doom-start.el | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lisp/doom-start.el b/lisp/doom-start.el index 64f3146e0..86b3e68e4 100644 --- a/lisp/doom-start.el +++ b/lisp/doom-start.el @@ -407,11 +407,10 @@ If RETURN-P, return the message as a string instead of displaying it." (display-warning 'initialization (format-message "\ -An error occurred while loading `%s':\n\n%s%s%s\n\n\ +An error occurred while booting Doom Emacs:\n\n%s%s%s\n\n\ To ensure normal operation, you should investigate and remove the -cause of the error in your initialization file. Start Emacs with +cause of the error in your Doom config files. Start Emacs with the `--debug-init' option to view a complete error backtrace." - user-init-file (get (car error) 'error-message) (if (cdr error) ": " "") (mapconcat (lambda (s) (prin1-to-string s t))