[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Buffer-local process environments
From: |
Stefan Monnier |
Subject: |
Re: [PATCH] Buffer-local process environments |
Date: |
Sat, 28 Aug 2021 10:05:24 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
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 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