Making the PATH and other environment variables available in emacs

前端 未结 4 1322
误落风尘
误落风尘 2020-12-10 14:30

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

4条回答
  •  失恋的感觉
    2020-12-10 14:44

    If your environment variables are being set in ~/.bash_profile, Create a file called ~/.emacs_bash and put in it the following:

    . ~/.bash_profile
    

    Don't forget the newline at the end of that line or it won't be executed.

    ~/.emacs_bash is loaded by emacs when you run bash from within it, such as when using M-x shell or shell-command so you can use it to set any environment variables you want available.

提交回复
热议问题