启动emacs时出现exec-path-from-shell消息

时间:2016-02-09 07:27:20

标签: bash shell emacs

我的init.el中有exec-path-from-shell,比如thisL

(exec-path-from-shell-initialize)

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

  

您似乎正在设置环境变量(“PATH”“MANPATH”)   你的.bashrc或.zshrc:这些文件只能通过交互式阅读   shell,所以你应该在启动时设置环境变量   .profile,.bash_profile或.zshenv等文件。请参考你的shell   手册页以获取更多信息。自定义`exec-path-from-shell-arguments'到   完成后删除“-i”,或禁用   `exec-path-from-shell-check-startup-files'来禁用此消息。   有关GNU Emacs和GNU系统的信息,请键入C-h C-a。

1 个答案:

答案 0 :(得分:4)

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

vector<pair<myClass, otherClass>>

把它放在

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

(exec-path-from-shell-initialize)