[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: |
Sat, 28 Aug 2021 17:19:37 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
On Sat, 28 Aug 2021 at 10:05, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> Michael Albinus [2021-08-28 15:18:56] wrote:
>> Augusto Stoffel <arstoffel@gmail.com> writes:
>>
>>>> W/o further reading, this cannot be right. Elements of
>>>> `process-environment' have always the syntax "VAR=VALUE". You add only a
>>>> VALUE (`exec-path') in `bufferenv'. I understand your intention, using
>>>> `bufferenv' as transportation vehicle, but I believe this is
>>>> mis-designed, and good for trouble. If not now, then later.
>>>
>>> This is a temporary, lexical variable that is inaccessible to the user
>>> directly. It's "destructured" again in the next hunk of the patch.
>>
>> I've seen this. But we shall avoid this dirty kind of programming, even
>> if it is internal only.
>
> I don't see anything dirty about it.
I agree, but since we are here we can discuss where we want to be
slightly wrong:
(1) when `process-environment' is local but `exec-path' isn't
or
(2) when `process-environment' or `exec-path' is nil
The first patch suffers from (1), the second from (2).
>
> I think you're just getting confused by the fact that the code uses
> `cons` to build a pair of a string and a list and you read it as adding
> add a string to the list.
>
> Maybe the confusion would be avoided by switching the two (i.e. use
> `(cons process-environment exec-path)`).
>
>
> Stefan
Re: [PATCH] Buffer-local process environments, Michael Albinus, 2021/08/28