There are difference between exec-path and PATH The value of environment variable “PATH” is used by emacs when you are running a shell in emacs, similar to when you are using a shell in a terminal. The exec-path is used by emacs itself to find programs it needs for its features, such as spell checking, file compression, compiling, grep, diff, etc. origin from http://ergoemacs.org/emacs/emacs_env_var_paths.html