Fix exec-path/osx-clipboard initializing too early
This commit is contained in:
parent
dc4e0f1556
commit
2d2ce3cff9
1 changed files with 15 additions and 14 deletions
|
@ -30,20 +30,21 @@
|
||||||
;; Don't open files from the workspace in a new frame
|
;; Don't open files from the workspace in a new frame
|
||||||
ns-pop-up-frames nil)
|
ns-pop-up-frames nil)
|
||||||
|
|
||||||
(cond ((display-graphic-p)
|
(if (not (display-graphic-p))
|
||||||
;; A known problem with GUI Emacs on MacOS: it runs in an isolated
|
(add-hook 'doom-post-init-hook #'osx-clipboard-mode)
|
||||||
;; environment, so envvars will be wrong. That includes the PATH
|
;; A known problem with GUI Emacs on MacOS: it runs in an isolated
|
||||||
;; Emacs picks up. `exec-path-from-shell' fixes this.
|
;; environment, so envvars will be wrong. That includes the PATH Emacs
|
||||||
(when (require 'exec-path-from-shell nil t)
|
;; picks up. `exec-path-from-shell' fixes this.
|
||||||
(def-setting! :env (&rest vars)
|
(defun doom|init-exec-path ()
|
||||||
"Inject VARS from your shell environment into Emacs."
|
(when (require 'exec-path-from-shell nil t)
|
||||||
`(exec-path-from-shell-copy-envs (list ,@vars)))
|
(def-setting! :env (&rest vars)
|
||||||
(setq exec-path-from-shell-check-startup-files nil
|
"Inject VARS from your shell environment into Emacs."
|
||||||
exec-path-from-shell-arguments (delete "-i" exec-path-from-shell-arguments))
|
`(exec-path-from-shell-copy-envs (list ,@vars)))
|
||||||
(defvaralias 'exec-path-from-shell-debug 'doom-debug-mode)
|
(setq exec-path-from-shell-check-startup-files nil
|
||||||
(exec-path-from-shell-initialize)))
|
exec-path-from-shell-arguments (delete "-i" exec-path-from-shell-arguments))
|
||||||
((require 'osx-clipboard nil t)
|
(defvaralias 'exec-path-from-shell-debug 'doom-debug-mode)
|
||||||
(osx-clipboard-mode +1))))
|
(exec-path-from-shell-initialize)))
|
||||||
|
(add-hook 'doom-pre-init-hook #'doom|init-exec-path)))
|
||||||
|
|
||||||
(IS-LINUX
|
(IS-LINUX
|
||||||
(setq x-gtk-use-system-tooltips nil ; native tooltips are ugly!
|
(setq x-gtk-use-system-tooltips nil ; native tooltips are ugly!
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue