From 9d52ba27472634724d7ae5195033161b5121b1b4 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 18 Sep 2022 01:08:27 +0200 Subject: [PATCH] fix: envvar file not loading This is because display-graphic-p returns nil so early in the startup process. Fix: #6802 --- lisp/doom-start.el | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/lisp/doom-start.el b/lisp/doom-start.el index 7f6248ef0..b8be85e9d 100644 --- a/lisp/doom-start.el +++ b/lisp/doom-start.el @@ -276,16 +276,6 @@ If RETURN-P, return the message as a string instead of displaying it." ;; ;;; Let 'er rip! -;;; Load envvar file -;; 'doom env' generates an envvar file. This is a snapshot of your shell -;; environment, which Doom loads here. This is helpful in scenarios where Emacs -;; is launched from an environment detached from the user's shell environment. -(when (and (or (display-graphic-p) - (daemonp)) - doom-env-file) - (setq-default process-environment (get 'process-environment 'initial-value)) - (doom-load-envvars-file doom-env-file 'noerror)) - ;;; Load core modules and set up their autoloads (require 'doom-modules) (autoload 'doom-initialize-packages "doom-packages") @@ -302,6 +292,15 @@ If RETURN-P, return the message as a string instead of displaying it." ;; configuration before the session is complicated by user config and packages. (doom-run-hooks 'doom-before-init-hook) +;;; Load envvar file +;; 'doom env' generates an envvar file. This is a snapshot of your shell +;; environment, which Doom loads here. This is helpful in scenarios where Emacs +;; is launched from an environment detached from the user's shell environment. +(when (and (or initial-window-system + (daemonp)) + doom-env-file) + (doom-load-envvars-file doom-env-file 'noerror)) + ;;; Last minute setup (add-hook 'after-change-major-mode-hook #'doom-run-local-var-hooks-h 100) (add-hook 'hack-local-variables-hook #'doom-run-local-var-hooks-h)