emacs-devel
[Top][All Lists]
Advanced

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

Re: Post-22.1 development?


From: Stefan Monnier
Subject: Re: Post-22.1 development?
Date: Fri, 15 Jun 2007 10:02:35 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

>>>> Does someone have another idea for a way to avoid the need
>>>> to change the programs that operate on the environment?
>> 
>>> I fear it is even more complex.  Processes running on remote hosts
>>> (started by process-file, for example) would need a different process
>>> environment but the one inherited from the local host.  This is an item
>>> being on my wish list for a long time.
>> 
>> I don't understand how that relates.  And I don't understand why it can't be
>> done in the process-file file-name-handler.

> Tramp manages it locally already. The point is when it comes to
> environment variables a user wants to be set on the remote host. He
> could write of course

> (let ((process-environment ...))
>    (setenv XXX ...)
>    (process-file ...))

> But $XXX would be set for the local case as well, because Tramp must
> start with a local call-process or start-process. This could result in
> undesired behaviour.

Oh, I see.  So yes, it's related: it shows there's a need to keep both the
normal environment and the "environment for the subprocess started by
call/start-process".

For Tramp, it's indeed pretty tricky: the environment to use for the local
process is not the one you receive from process-environment (which is
destined to the remote process) but is rather "the global default
process-environment" (maybe with a few minor adjustments).  But this default
process-environment is not quite the same as the initial-environment that
I proposed either (although it can probably get by with just
initial-environment).


        Stefan






reply via email to

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