[Top][All Lists]

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

Re: [PATCH] Buffer-local process environments

From: Augusto Stoffel
Subject: Re: [PATCH] Buffer-local process environments
Date: Thu, 02 Sep 2021 09:14:33 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

On Wed,  1 Sep 2021 at 15:38, Stephen Leake <stephen_leake@stephe-leake.org> 

>>> The GNU ELPA package wisi takes an intermediate approach; it maintains a
>>> list of project-specific environment variables in the project object,
>>> and let-binds them in process-environment whenever it runs a process for
>>> the project.
>> If I understand correctly, this works only when launching the WisiToken
>> program, am I correct?
> No, any process. In ada-mode, that includes the compiler and the cross
> reference tool.

Okay, I've found wisi-prj.el, but I can't find any documentation for the
process environment aspect of it.  Therefore it's still not clear to me
how it relates with this discussion.

Wisi claims to be a code-parsing tool.  Are there any new ideas in it
that pertain to project-wise process environments specifically and could
be adopted more broadly, say by project.el?

At the risk of repeating myself too much, here is my idea of how
project-specific environments would work:

- Every command that creates a process should use the buffer-local value
  of `process-environment' if applicable (this is what the attached
  patch addresses for `compile').
- Every buffer that "belongs" to a project gets the right buffer-local
  value of `process-enviroment' (as well as `exec-path') by one of
  several possible techniques:
  - Via an exec directive in the dir-locals file
  - Using a direnv-like package such as `envrc' or `buffer-env' (both
    currently on MELPA).

reply via email to

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