emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Buffer-local process environments


From: Stephen Leake
Subject: Re: [PATCH] Buffer-local process environments
Date: Mon, 06 Sep 2021 08:17:49 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (windows-nt)

Augusto Stoffel <arstoffel@gmail.com> writes:

> On Wed,  1 Sep 2021 at 15:38, Stephen Leake <stephen_leake@stephe-leake.org> 
> wrote:
>
>>>> 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.

The cl-defstruct wisi-prj has these slots (among others):

  compile-env
  ;; List of strings NAME=VALUE for `compilation-environment'; used
  ;; when running the compiler or makefile. Also prepended to
  ;; `process-environment' when the project file is parsed, or when
  ;; the project file is used by a tool in an external process.

  file-env
  ;; Environment (list of strings NAME=VALUE) set in project file;
  ;; prepended to `process-environment' running tools in an external
  ;; process.


> Wisi claims to be a code-parsing tool.  

Actually it's an elisp interface to an external generated parser,
allowing Emacs to take advantage of the parser.

> 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?

file-env (probably renamed to project-env) would make sense in any
project that uses environment variables.

compile-env would make sense in any project that runs a compiler, or
uses compilation-mode to run a tool.

I guess both would be cl-defgeneric functions, with default
implementation returning nil.

-- 
-- Stephe



reply via email to

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