Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

exec-path-from-shell message when starting emacs

Tags:

bash

shell

emacs

I have exec-path-from-shell in my init.el like thisL

(exec-path-from-shell-initialize)

Whenever I start emacs, I get the following message:

You appear to be setting environment variables ("PATH" "MANPATH") in your .bashrc or .zshrc: those files are only read by interactive shells, so you should instead set environment variables in startup files like .profile, .bash_profile or .zshenv. Refer to your shell's man page for more info. Customize `exec-path-from-shell-arguments' to remove "-i" when done, or disable `exec-path-from-shell-check-startup-files' to disable this message. For information about GNU Emacs and the GNU system, type C-h C-a.

like image 929
dagda1 Avatar asked Feb 08 '23 19:02

dagda1


1 Answers

If you don't want Emacs to warn about the location of your environment variable settings, disable that option with:

(setq exec-path-from-shell-check-startup-files nil)

Put that before

(exec-path-from-shell-initialize)

in your .emacs.

like image 103
Barmar Avatar answered Feb 17 '23 06:02

Barmar