From 5711ac833fd5f3c5287ebd619c5433ce98b3b565 Mon Sep 17 00:00:00 2001 From: Abdelhak Bougouffa Date: Wed, 8 Nov 2023 21:43:29 +0100 Subject: [PATCH] fix(core): first file stuff loaded immediately when in daemon mode --- elisp/+minemacs.el | 7 ++++++- init.el | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/elisp/+minemacs.el b/elisp/+minemacs.el index 65793bf7..67b3373e 100644 --- a/elisp/+minemacs.el +++ b/elisp/+minemacs.el @@ -225,7 +225,12 @@ Executed before `after-find-file', it runs all hooks in `%s' and provide the `%s (run-hooks ',hook-name))) (if (daemonp) ;; Load immediately after init when in daemon mode - (add-hook 'after-init-hook #',fn-name 90) + (add-hook + 'after-init-hook + (lambda () + (provide ',feature-name) + (run-hooks ',hook-name)) + #',fn-name 90) (advice-add 'after-find-file :before #',fn-name '((depth . -101))))))) ;; From Doom Emacs diff --git a/init.el b/init.el index ca86e86f..de631681 100644 --- a/init.el +++ b/init.el @@ -185,7 +185,7 @@ ;; minemacs-lazy' can be loaded then it incrementally run the hooks in ;; `minemacs-lazy-hook' when Emacs goes idle. (defun +minemacs--loaded-h () - (+log! "=============== Loaded Emacs ===============") + (+log! "=============== Loaded Emacs%s ===============" (if (daemonp) " (in daemon mode)" "")) (+info! "Loaded Emacs in %s." (emacs-init-time)) ;; When running in an async Org export context, there is no need to set