启动emacs时的exec-path-from-shell消息

dag*_*da1 2 emacs bash shell

我在init.el中有像这样的exec-path-from-shell

(exec-path-from-shell-initialize)
Run Code Online (Sandbox Code Playgroud)

每当我启动emacs时,都会收到以下消息:

您似乎在.bashrc或.zshrc中设置环境变量(“ PATH”“ MANPATH”):这些文件仅由交互式shell读取,因此您应在.profile,.bash_profile或.start等启动文件中设置环境变量。 hen 有关更多信息,请参考外壳的手册页。自定义“ exec-path-from-shell-arguments”以在完成后删除“ -i”,或禁用“ exec-path-from-shell-check-startup-files”以禁用此消息。有关GNU Emacs和GNU系统的信息,请键入ChCa。

Bar*_*mar 5

如果您不希望Emacs警告您的环境变量设置的位置,请通过以下方式禁用该选项:

(setq exec-path-from-shell-check-startup-files nil)
Run Code Online (Sandbox Code Playgroud)

放在前面

(exec-path-from-shell-initialize)
Run Code Online (Sandbox Code Playgroud)

在你的.emacs