[Shell] Pulling environment variables with ‘exec-path-from-shell’

This commit is contained in:
Daniel - 2017-07-31 13:20:42 +02:00
parent de0233d7cb
commit a945fb489e
Signed by: dbo
GPG Key ID: 4F63DB96D45AA9C6
2 changed files with 15 additions and 13 deletions

26
init.el
View File

@ -192,17 +192,14 @@
;; Environment Variables ;; Environment Variables
(setenv "SSH_AUTH_SOCK" "/run/user/1000/ssh-agent.socket") (exec-path-from-shell-copy-envs '("SSH_AUTH_SOCK"
(setenv "SSH_AGENT_PID" "SSH_AGENT_PID"
(substring (shell-command-to-string "systemctl show --user ssh-agent.service -p MainPID --value") "PATH"
0 -1)) "TEXMFHOME"
(setenv "PATH" (concat (concat (getenv "HOME") "/.local/bin") "PERL5LIB"
":" "PERL_LOCAL_LIB_ROOT"
(getenv "PATH"))) "PERL_MB_OPT"
(setq exec-path (append (list (concat (getenv "HOME") "/.local/bin")) "PERL_MM_OPT"))
exec-path))
(setenv "TEXMFHOME" (expand-file-name "~/Documents/texmf"))
t) t)
(add-hook 'after-init-hook #'db/run-init) (add-hook 'after-init-hook #'db/run-init)
@ -222,6 +219,9 @@
(setq user-full-name "Daniel Borchmann" (setq user-full-name "Daniel Borchmann"
user-mail-address db/personal-mail-address) user-mail-address db/personal-mail-address)
(setq explicit-shell-file-name "/usr/bin/zsh"
shell-file-name "/usr/bin/zsh")
(setq custom-file (expand-file-name "private/custom.el" emacs-d)) (setq custom-file (expand-file-name "private/custom.el" emacs-d))
(load-file custom-file) (load-file custom-file)
@ -616,6 +616,9 @@ _h_ _l_ _o_k _y_ank
(use-package perspective (use-package perspective
:commands (persp-mode)) :commands (persp-mode))
(use-package exec-path-from-shell
:ensure exec-path-from-shell
:commands (exec-path-from-shell-copy-envs))
;; * Mail ;; * Mail
@ -1081,7 +1084,6 @@ _RET_: ?RET? _M_: ?M?
(add-hook 'compilation-filter-hook #'endless/colorize-compilation))) (add-hook 'compilation-filter-hook #'endless/colorize-compilation)))
(use-package shell (use-package shell
:init (setq explicit-shell-file-name "/usr/bin/zsh")
:config (progn :config (progn
(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on) (add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)
(add-hook 'comint-output-filter-functions 'comint-strip-ctrl-m))) (add-hook 'comint-output-filter-functions 'comint-strip-ctrl-m)))

@ -1 +1 @@
Subproject commit 3d63ef0ec5dc7f63536781f864caf80c46536dcf Subproject commit 0ed59e40e00ebad723608768e6b6573818cef385