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: Dmitry Gutov
Subject: Re: Managing environments (Python venv, guix environment, etc.)
Date: Mon, 25 Jul 2016 02:04:42 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:47.0) Gecko/20100101 Thunderbird/47.0

On 07/24/2016 11:25 AM, address@hidden wrote:

Just a note: Ideally, Elisp code would also (somehow) go through the
environment dispatcher, and see the exec-path and process-environment of
the appropriate environment. There is surely Elisp code makes direct use
of exec-path/process-environment and it should behave the same as
external processes.

Like Eli said, this seems unwise. But it hints at a logical problem: if start-process and friends are simply documented to use exec-path and process-environment, but use their modified values in some circumstances, someone trying to debug this could have a big problem.

Especially if the feature is implemented not using nadvice, but with file handlers.

So I think we should either fall back to the idea of using buffer-local values and make it work somehow, or have environment.el provide its own versions of call-process, etc, that use the modified environments.

The latter option will require modifying all appropriate callers, but seems like the cleanest approach to me.

Alternatively, the docstrings of all process-interacting functions should be updated to mention environments.el, and at that point it would make sense to just integrate it into the core. Maybe the result would look similar to what you said, with all process primitives using the new functions (called e.g. environment-exec-path and environment-process-environment).



reply via email to

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