mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
fix: envvar file not loading
This is because display-graphic-p returns nil so early in the startup process. Fix: #6802
This commit is contained in:
@ -276,16 +276,6 @@ If RETURN-P, return the message as a string instead of displaying it."
|
|||||||
;;
|
;;
|
||||||
;;; Let 'er rip!
|
;;; 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
|
;;; Load core modules and set up their autoloads
|
||||||
(require 'doom-modules)
|
(require 'doom-modules)
|
||||||
(autoload 'doom-initialize-packages "doom-packages")
|
(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.
|
;; configuration before the session is complicated by user config and packages.
|
||||||
(doom-run-hooks 'doom-before-init-hook)
|
(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
|
;;; Last minute setup
|
||||||
(add-hook 'after-change-major-mode-hook #'doom-run-local-var-hooks-h 100)
|
(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)
|
(add-hook 'hack-local-variables-hook #'doom-run-local-var-hooks-h)
|
||||||
|
Reference in New Issue
Block a user