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: Fri, 30 Apr 2021 09:48:38 +0200 Message-ID: <87tunoyzzd.fsf@gmx.de> References: <87eeets6jf.fsf@gmail.com> <8735v99f4i.fsf@gmail.com> <87y2d1xada.fsf@gmx.de> <877dkkcjrj.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="24886"; 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 Fri Apr 30 09:50:28 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 1lcNuu-0006Nt-G0 for ged-emacs-devel@m.gmane-mx.org; Fri, 30 Apr 2021 09:50:28 +0200 Original-Received: from localhost ([::1]:59906 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lcNut-0002Vn-Ja for ged-emacs-devel@m.gmane-mx.org; Fri, 30 Apr 2021 03:50:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58944) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcNtl-0001at-B2 for emacs-devel@gnu.org; Fri, 30 Apr 2021 03:49:17 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]:47137) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcNtj-00053T-Ea for emacs-devel@gnu.org; Fri, 30 Apr 2021 03:49:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1619768920; bh=UQ0tMTlG4oUGskKO8hZNggHDdD6oG2qxcoFBXJcdS8M=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=HC3tOSkb4rzrNZh6lu24jVLEpjZTAL+OTx1rSjXJ4AH4ABrC4ItDFSNDjD5bTZ35h YStEIJ3jJHBXcsSsjTSUEbKY4sRm/ykJnjmxp90il6/CWRHtZcNS5+jaAEhZOuPzBA +Ii3tP1W0CuaWjdbj7NsmWqDtjF35xBiyh0iz450= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from gandalf.gmx.de ([79.140.125.20]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N1fii-1lRI5w1XlA-011xdK; Fri, 30 Apr 2021 09:48:40 +0200 In-Reply-To: <877dkkcjrj.fsf@gmail.com> (Augusto Stoffel's message of "Fri, 30 Apr 2021 09:29:52 +0200") X-Provags-ID: V03:K1:LEztHWPNXaNI4coPysC+LlC+nfOLilcNq1oOVNQJ/8kWs1cRRwB 4YFYGy1pjuknCVsrjYaFnqqH6DuVHlITbT64MsMRgje7Im0swQXpVjNIDtzbUlrWf41Q3ft LFKtVlyMOiaT9Diy+7Oc1tybeMbRL5q3kyNaw3rsW8m3ND9EKDhgWkzXHTuut/ZLr6ZdrBu h4OiQNcVcdLEdGeuhT5xg== X-UI-Out-Filterresults: notjunk:1;V03:K0:8SrAQCmkwKg=:PRdUppwJvnFwxeB1ksJQxy /HSoKyXGUa8rkUWy5bkTejVtty7bil5LMERJLUENMPB9uVKDQd7bO67XKADCYMvvedyLFG4NT P3mXsTS17mFBa+h0E6RcX2tUlkjil6FzIc0jSgwvQEzdhj9UwdMkVzqcTcpg4VLzi5wJZx6cX K2UJvgPr8CGZ4n1a1VGJmHzyUBCU6x3XETC2GjFCuVCL6LX4Sah18x7Ljfc5qHS9mVhfol8EP Ti0gxklZMvU/PYx876hc0jSfzw5HA4CPxYDeymKFUslJrwqIDKzrl8ZgOMJfZBbRRNYMdpmim bDTVtfeGlSCOiXOllSOPTsSFi6KPUMLKqZpRXuv0Xh3545yCm9p0ghtjX3CNQ9t+sexdLYRgr Pbj+e51G2c6rKcI9WJbRoOIEf7Gqy/0tRXaDlj46VuSqFKW0kUtQ9FnEthiZzehq9uxBaQm5z fV60GzJ1tFQETrKUoXMnd7j7Sv3VE2p+ogCQe7vDEgBis0K19GEKv4OjJLWQlLAid8f9/Dxpf /7e9b3mngICxVDIid7GHlkxBVgBcEXC1NM9+TUBGxvcGwdtnBTpyGZJN1gxOT/jkAMVGCS1pR nR/Ih1A4dyulfzUIVeOUUu9qIO9cPoXm1vv1SD6fveT02HUjNz+t+q2KiNlhJ/Bp/7/C44MkT yr00pOqAR19XXqOtFcB5DST6F1gcd+vxFc0JFD9Ty1x5c/jxQ+NNjQ88Tb/4J+gp+bV3B6sO3 zA1T+8eoixSlDAY5oUkaskt6GL0K1ZP+WrXAOuEvT1jZ8srfNUWIz7vdQwGI056+b9goJbLI 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:268657 Archived-At: Augusto Stoffel writes: > Ah, now I see why this happens. But I'm not sure I like the idea. Why > not introduce a specific dynamic var for this purpose, similar to > `compilation-environment' in compile.el? Because there's a lot of functions out there, which work for the local host, and should work also for remote hosts. See for example vc-git-grep, which has --8<---------------cut here---------------start------------->8--- (let ((default-directory dir) (compilation-environment (cons "PAGER=" compilation-environment))) --8<---------------cut here---------------end--------------->8--- compilation-environment will be propagated to process-environment later on. And the setting for PAGER is needed for both local and remote instances of vc-git-grep. There's no special code in vc-git-grep for the remote case. > PS: Is there a single place to tell Tramp not to change the environment > of the remote host at all? I understand the rationale for all the > automagic stuff, and I would appreciate it if I had to access lots of > remotes. However, in my case, I only access a very small number of > servers, each of which requires a very specific configuration. Hmm, I don't see it immediately. Maybe we could discuss this in a separate thread, where you specify in more detail what you like? Perhaps, connection-local variables are the solution for you. Best regards, Michael.