使路径和其他环境变量在emacs中可用 [英] Making the PATH and other environment variables available in emacs
问题描述
我使用Terminal.app应用程序和emace shell 两者互换这些使用bash,而且两者似乎都起作用,但是我仍然存在这样的问题,即环境在两者中并不是相同的。
我正在运行一个干净安装的OSX Lion,而emacs 24来自于 emacs ,并希望emacs shell中的环境变量与osx下的Terminal.app相同。如何解决?
只需安装awesome小包 exec-path-from-shell ,你完成了!它将自动将您的emacs exec-path
设置为与 zsh中的
config。 PATH
相同/ bash
它还将允许您复制其他shell变量的值,如下所示:
code>(exec-path-from-shell-copy-envPYTHONPATH)
Working with emacs in OSX can some times be troubling.
I interchange with using the Terminal.app application and the emace shell both of these use bash, and both seem to work, I do however have the problem that the environment is not setup identically in both.
I'm running a clean installation of OSX Lion, and emacs 24 from emacs and would like for the environment variables in the emacs shell to make the same as in the Terminal.app under osx. How do I fix that?
Just install the awesome little package exec-path-from-shell and you're done! It will automatically set your emacs exec-path
to be same as the PATH
in your zsh/bash
config.
It will also allow you to copy the values of other shell variables like this:
(exec-path-from-shell-copy-env "PYTHONPATH")
这篇关于使路径和其他环境变量在emacs中可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!