From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Augusto Stoffel Newsgroups: gmane.emacs.devel Subject: Re: Buffer-local process environments Date: Fri, 30 Apr 2021 09:29:52 +0200 Message-ID: <877dkkcjrj.fsf@gmail.com> References: <87eeets6jf.fsf@gmail.com> <8735v99f4i.fsf@gmail.com> <87y2d1xada.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34910"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) Cc: Stefan Monnier , emacs-devel@gnu.org To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Apr 30 09:35:15 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 1lcNgA-0008xA-0B for ged-emacs-devel@m.gmane-mx.org; Fri, 30 Apr 2021 09:35:14 +0200 Original-Received: from localhost ([::1]:60286 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lcNg8-0007LQ-Rk for ged-emacs-devel@m.gmane-mx.org; Fri, 30 Apr 2021 03:35:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55456) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcNb4-00036t-CT for emacs-devel@gnu.org; Fri, 30 Apr 2021 03:29:58 -0400 Original-Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]:42994) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lcNb2-000254-KL for emacs-devel@gnu.org; Fri, 30 Apr 2021 03:29:58 -0400 Original-Received: by mail-ej1-x635.google.com with SMTP id y7so4906298ejj.9 for ; Fri, 30 Apr 2021 00:29:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=BtTcTwstiSG/lC138ptmn0U+gH13cQ3hiU4cQNQ0Dyo=; b=W+14kJ3zmUiynXgAZ5eDsALLL58HbmsdHmXhGjGe242g7zt94PAKrE2eHltCBZyGR4 4V5wT6PZ6l5qqd4jCatP39zTg4zE5xtEwm2EbEctS89ua5zaZU1kEKP54AgqOkOSxivX kCL+OmNZ1ZHP48OCljoUp3MLG9UWXQNwkO4RT1qTnXefUsEQMietr2cBGThzhs5V2CLj EKpeJVFPwyr2ljAnP00fesxEKR6qXiuYRmMM2maiRglpcTdMEYstcYFe2hqHeBc1/wBT Mho0PgYYpS/mNzq0XVK0vE1pMyV33uJVSNZ3s4UHODkSuMnuIhGd1ugcP8Nggo+2W37N eVbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=BtTcTwstiSG/lC138ptmn0U+gH13cQ3hiU4cQNQ0Dyo=; b=Ow09rLeuXmYl1cXE2rqSgmAtkiY9CxmA8j9Veto77PSGkF+jCnnczkw6MNp7bBsLo2 lwFiMMOBOBd3Vie3MFiiwpe1jWYHhmhsUZRMLIEW/l2F6zg4Tzx7WBYJEAPcu7WQiY4g UHU2QSJ/Z7+ThMhJlEDUrn2HVgPL1dn7vmOqkhkTajBQ4RUUzLtMJ2wxJdFrbDnLA4aQ a/GM+qFWpvhAxEni0LdMTpYXXW+sG8RMwMTjD/Vu0x0osleSpCXLIVIQvCF/N7XWzxrY 1BTkZ0WfhnHPQsYOU9lDXCmpLpOoBmGO4MbKP//SO1jvHy1J7Kgn8LUIbwL1HDeFHv8d oiBQ== X-Gm-Message-State: AOAM532wnn2Y0YniGZHNXqP7ynllwG9VYmdtIbHnVGKgB8zVR3PI/A1w yKMc2Kd+yg+SrZpXwi4XAxzuHcf6vdvbNA== X-Google-Smtp-Source: ABdhPJwNLF67P7Z5hutSrSOm7aTYJUaKBzcjTrIzkt0GrG5QUJAhJ4NZMDNdtZOGZk0DV6yvXyWgHQ== X-Received: by 2002:a17:907:628a:: with SMTP id nd10mr2807586ejc.326.1619767794699; Fri, 30 Apr 2021 00:29:54 -0700 (PDT) Original-Received: from ars3 ([2a02:908:2211:8540::68a]) by smtp.gmail.com with ESMTPSA id gn19sm1365135ejc.68.2021.04.30.00.29.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Apr 2021 00:29:54 -0700 (PDT) In-Reply-To: <87y2d1xada.fsf@gmx.de> (Michael Albinus's message of "Thu, 29 Apr 2021 19:34:57 +0200") Received-SPF: pass client-ip=2a00:1450:4864:20::635; envelope-from=arstoffel@gmail.com; helo=mail-ej1-x635.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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:268656 Archived-At: >> 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. 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? 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. > > A buffer-local process-environment is another, new game player. > > Best regards, Michael.