From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Re: Buffer-local process environments Date: Thu, 29 Apr 2021 19:34:57 +0200 Message-ID: <87y2d1xada.fsf@gmx.de> References: <87eeets6jf.fsf@gmail.com> <8735v99f4i.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22277"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Stefan Monnier , emacs-devel@gnu.org To: Augusto Stoffel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Apr 29 19:40:30 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lcAeL-0005h2-UG for ged-emacs-devel@m.gmane-mx.org; Thu, 29 Apr 2021 19:40:29 +0200 Original-Received: from localhost ([::1]:60068 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lcAeL-0004Rq-0l for ged-emacs-devel@m.gmane-mx.org; Thu, 29 Apr 2021 13:40:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37294) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcAZD-00019F-PI for emacs-devel@gnu.org; Thu, 29 Apr 2021 13:35:12 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]:57253) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcAZ6-0003Su-1e for emacs-devel@gnu.org; Thu, 29 Apr 2021 13:35:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1619717698; bh=EuRWXjBmuG9LHje9c+r8UEy223Xz0jV8gLOPlEDTuoY=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=RggPMPgXE9a0wxQT+3enUlmGWhhy7iexUD8iLw+0Y5JvwfURA7SuC0+ZN0tDxfw0s dRGZ7Mlc0n/CNEFUHRAJxL0YdI1iuHI238XpbwZr60ysCSajZ72q76J3VOioISHVS5 epnhKKs5eDhKGd8TZ2aAUCdEAOmdPenSTd2TdPEo= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from gandalf.gmx.de ([212.91.249.85]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N79u8-1lWQxy2epI-017R9d; Thu, 29 Apr 2021 19:34:58 +0200 In-Reply-To: <8735v99f4i.fsf@gmail.com> (Augusto Stoffel's message of "Thu, 29 Apr 2021 19:26:05 +0200") X-Provags-ID: V03:K1:lb42InxieyUkn3dDn1X+jzf1dTlGQKNldSh00FiIHXqGc3mAJCr +GHQPr2AjVjGRkmQVqHwttp2susj9EuZg8/EfGnH8AFrjMFiLjEPqCJbHx0ib6ZLS8g37js tUvxxwR9temgFmXG1EGAvCju/06X8CJwfFRq/sbhwegNP00iiPKKmwkRZgVGa0mCVRpBZ1L SAyOV1Ojs9yqAMF/WpNgQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:Wavf276cGIY=:eynyNFAoqR/AMjq4pt2XBA us37ukC6SB7Vz22y3fR+swG7zb3NMCtYKD4ICEFwCGb2RHL3YW8M+9gqfe7+QLu38rE/U3mKE DLgwfX6gDC4YYf/+tGZloUOK/JCBbDyhrd1XFzmfDjx+vPLUTiPi73HwSRqEjXmx55fqiKj0/ GSMcagMggIbObcaqkbXKNUI3KLS5hkIFn6uqI2BR/An7fKLG8P8coo35GAhIH2Cx+2bOJ+llz LLVTve5yMZZmSB4Ow0Ey7IZpM5DTTWIJm7MvP1TVwVUI5HKkmhItfNT3bFoEracPh5zkQttto umWrSe4kV3dDv5CPhLG+yjb6wK+ohSgrFN+K+1gbZNWXkQ/6nOWDVEAqxk9zGa3JH2KceKqBG wToZruOxVH+g+hrTu9fvTHE88M6lNwexGgGr6li9zt+3bHSJX7e0ebjfyG7c75Sc1kka9H2nM CsmlXgop7UU0Lk+W2A6Yj/Ogca3yisu/oBq78bmdZrmYzT2ENxOpHuC6QHeIhCpve+1JOqCqP 8zKSJUFrMhe7xnw+XhHNExs2ytiHsWmlgzwBOoweWztA7tvoZPbU9p+k7PsTUT1RpbJcEqKVN IFkjmLOcGm1uAMRaaTFccNK1RkGR3cY4FMN4HBFFup2zVpv50z66RFnh357DAGbmsNW7xdkiw iJLIRQOE+Ef0T8hndW/kZ0Srd/8s5/049QwIwIgpeI7zftC47GuwSvxy4/waH2oA+4so4W6aO Nq7X2KuVkJyUijvSfTiqfAE6TYPhQavlsjKU3YwvbU5EGKjYobwQ5v8Vamhiyr6F4Ya35w14 Received-SPF: pass client-ip=212.227.17.22; envelope-from=michael.albinus@gmx.de; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:268628 Archived-At: Augusto Stoffel writes: > I wasn't aware of recompile. The attached patch works with it. The > attached version breaks with Tramp, but I think this is a Tramp bug. > > In fact, even without the patch, if I make my `process-environment' > buffer local, then `M-x cd' to a ssh path, then do `M-! env', I see a > mixture of my machine's environment and the remote machine's environment. > For instance, PATH has the local machine value. Tramp uses already a hack. Obviously, it cannot use process-environment as-it-is on a remote machine, because it is, ahem, a remote machine and not the local one. Therefore, Tramp forces only environemt variables, which are not set in the defauzlt value of process-environment, to the remote. The idea is, that specific remote environment variables are added to process-environment via a let-binding. A buffer-local process-environment is another, new game player. Best regards, Michael.