Use exec-path-from-shell package to setup exec-path and PATH

This commit is contained in:
2014-07-26 00:56:10 +01:00
parent 57713022e8
commit 971440d67c
5 changed files with 6 additions and 21 deletions

View File

@@ -31,7 +31,6 @@
;; Load runtime specific setup files
(load-file (get-config-path "runtimes/ruby.el"))
(load-file (get-config-path "runtimes/nodejs.el"))
(load-file (get-config-path "runtimes/golang.el"))
;; Custom variables file
(setq custom-file (get-config-path "custom-variables.el"))

View File

@@ -36,6 +36,7 @@
dash-at-point
dired+
ecb
exec-path-from-shell
expand-region
feature-mode
fill-column-indicator
@@ -170,6 +171,10 @@
(setq stack-trace-on-error t) ;; hack to fix a load-error
(if window-system (ecb-activate)))
(when (require 'exec-path-from-shell)
(when (memq window-system '(mac ns))
(exec-path-from-shell-initialize)))
;; Load Auto-Complete
(when (require 'auto-complete nil 'noerror)
(require 'auto-complete-config)

View File

@@ -1,10 +0,0 @@
;;
;; Go setup
;;
(setq my-gopath (file-truename "~/.go"))
(setq my-gopath-bin (concat my-gopath "/bin"))
(setenv "GOPATH" my-gopath)
(setenv "PATH" (concat my-gopath-bin ":" (getenv "PATH")))
(setq exec-path (cons my-gopath-bin exec-path))

View File

@@ -2,9 +2,6 @@
;; Node.js setup
;;
(setq exec-path (cons "~/.nvm/v0.10.24/bin" exec-path))
;; (setenv "PATH" (concat "~/.nvm/v0.10.24/bin:" (getenv "PATH")))
;; nvm
(when (require 'nvm nil 'noerror)
(nvm-use "v0.10.24"))

View File

@@ -3,11 +3,5 @@
;;
;; rbenv
(setq exec-path (cons "~/.rbenv/bin" exec-path))
(setq exec-path (cons "~/.rbenv/shims" exec-path))
(setenv "PATH" (concat "~/.rbenv/bin:" (getenv "PATH")))
(setenv "PATH" (concat "~/.rbenv/shims:" (getenv "PATH")))
;; (when (require 'rbenv nil 'noerror)
;; (global-rbenv-mode))