purcell / exec-path-from-shell

Make Emacs use the $PATH set up by the user's shell
Other
1.43k stars 82 forks source link

error when set 'exec-path-from-shell-variables before the initialization #116

Open arademaker opened 10 months ago

arademaker commented 10 months ago
Warning (initialization): An error occurred while loading ‘/Users/ar/.emacs.d/init.el’:
Symbol's value as variable is void: exec-path-from-shell-variables

But I am following the README suggestion:

(dolist (var '(...))
  (add-to-list 'exec-path-from-shell-variables var))

(when (memq window-system '(mac ns x))
  (exec-path-from-shell-initialize))
purcell commented 10 months ago

You'd need to (require 'exec-path-from-shell) first in order to modify the variables defined in the library. Functions are different, because they can be autoloaded, e.g. calling exec-path-from-shell-initialize triggers the loading of the library if necessary.