emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Managing environments (Python venv, guix environment, etc.)


From: Stefan Monnier
Subject: Re: Managing environments (Python venv, guix environment, etc.)
Date: Fri, 15 Jul 2016 12:26:59 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

> - Make exec-path and process-environment buffer-local
>   I am told that this will cause a lot of bizarre behavior.  In
>   particular, I understand that this won't work with M-x compile, which
>   reuses another buffer to run the compilation.

Indeed, it probably won't work right.

> - Make exec-path and process-environment a different kind of
>   buffer-local dynamic variable
[...]
>   the buffer-locals of the buffer that was current at the time of the
>   M-x compile invocation.

Too hand-wavy and the details are likely to be pretty ugly (lots of
guessing involved).

> - Use dir-locals

>   I'm not sure how this could work, given the problems with making
>   exec-path and process-environment buffer-local, but including it to be
>   complete.

If M-x compile obeys dir-locals that could work, yes.

Another option is to use process-file's file-name-handler-alist.

And of course, yet another is to advice-add on call-process and start-process.


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]