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: [PATCH] Buffer-local process environments Date: Sat, 28 Aug 2021 14:55:34 +0200 Message-ID: <87h7f9k9tl.fsf@gmail.com> References: <87eeets6jf.fsf@gmail.com> <8735v99f4i.fsf@gmail.com> <87y2d1xada.fsf@gmx.de> <877dkkcjrj.fsf@gmail.com> <87tunoyzzd.fsf@gmx.de> <87eeerby1n.fsf@gmail.com> <87a6pfepo6.fsf@gmx.de> <874kflmzn3.fsf@gmail.com> <87wns9glm1.fsf@gmx.de> <87y2co4hto.fsf@gmail.com> <87v97reubc.fsf@gmx.de> <87lf4lkb1w.fsf_-_@gmail.com> <837dg5oidr.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32128"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) Cc: michael.albinus@gmx.de, monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Aug 28 14:56:19 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 1mJxsg-0008B7-GA for ged-emacs-devel@m.gmane-mx.org; Sat, 28 Aug 2021 14:56:18 +0200 Original-Received: from localhost ([::1]:35948 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mJxsf-0004tF-03 for ged-emacs-devel@m.gmane-mx.org; Sat, 28 Aug 2021 08:56:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41762) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mJxs4-00047b-Dn for emacs-devel@gnu.org; Sat, 28 Aug 2021 08:55:40 -0400 Original-Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:41820) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mJxs2-0006qR-3A; Sat, 28 Aug 2021 08:55:40 -0400 Original-Received: by mail-wm1-x334.google.com with SMTP id c129-20020a1c35870000b02902e6b6135279so6204225wma.0; Sat, 28 Aug 2021 05:55:37 -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=K9/3dJl6CpmEOqVateXrFzZAHBXxTaoHocDjiNwnVc4=; b=LIrO83caw3Y8wYqGlukOkoXwJqSwYFors5GSWkbgmwjl/IGro24ilEb62OVk69lydn qL/KZhD4AZpo42LNeNVUu2n4TgurZfdeqPSIIcTXDS1+Cz+/j6UdYuNEEP+8kUg29aoP EqnQVJurHxeXx1pad0kDMNIzHBcpnlxbK6OUKYhL2sDS43ol7NjqWHuvnGgePtYzxJ36 9G2LFbrx1eosHjC48Tj0/YmAki2/GO4DFPdYyH/w6Akk5NM2mHUlQIiBCyZ2JHJ8FE6Q wzr0eoRZgKZmtJSowVKTp46ggiPom6SQGO+/4MaoYQcbVJ+h1kkL7XEI7n3vrAa5LynP t8Aw== 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=K9/3dJl6CpmEOqVateXrFzZAHBXxTaoHocDjiNwnVc4=; b=hGcEGiscbXfqGyEV/3FcKh8kE+iIqWva1K0LDvR2T6b1roDFhUYjFffgJJhSrcjmy/ P6YsxVOzPZAmOCk4EIGHd3u+lx3GT6DlWqJYfm0Tre4UTAAvt0penfLORWxu4r8UmeBU /4jgZHKrlDUp1oattgcYMJhv2YRTS7gzAHRb1JWZ3aAvN6WiGe1bl59ZpdcBUhFswypT PROn4v5X7TJWhvN9Qm8XJJKE25E4VnKOxdmEQ0O9geKkaqnJX4TBeQKMr5du5F+O6pSc uTCX6pd/R6u1L0L7g4oFutD8n9iWFBMiYk2o1G7RMT8/ibSh1ycA1R3UaNpH9bUtuogN LxBg== X-Gm-Message-State: AOAM530IG/iRTDkZ3UegIcWOYWNYriDZGIWlvawNyP4MLsJEVhmcgi5T 4Z7r8VUykhvEWHqrlYdTHOyLeN1b3XTLcg== X-Google-Smtp-Source: ABdhPJyqXtmV62L621ONTroiI0Vjn4sM40Bma2/wmx0XhIOIoZ+B91OSmhmyqQeLm/i3G8IFxv2KWQ== X-Received: by 2002:a1c:1dcc:: with SMTP id d195mr13796057wmd.85.1630155335849; Sat, 28 Aug 2021 05:55:35 -0700 (PDT) Original-Received: from ars3 ([2a02:8109:8ac0:56d0::ae3f]) by smtp.gmail.com with ESMTPSA id n15sm9486821wrv.48.2021.08.28.05.55.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Aug 2021 05:55:35 -0700 (PDT) In-Reply-To: <837dg5oidr.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 28 Aug 2021 15:37:04 +0300") Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=arstoffel@gmail.com; helo=mail-wm1-x334.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:273290 Archived-At: On Sat, 28 Aug 2021 at 15:37, Eli Zaretskii wrote: > And I'm not sure I understand the rationale, and you didn't describe > it. Environment variables and PATH in particular are generally global > on the entire system, so what does this feature correspond to? > separate environment variables in each shell window? Why would anyone > want to do that? And why should we make it easier by providing > buffer-local values of those, instead of letting each Lisp program > that needs it let-bind the variables instead? Yes, sorry for suddenly reviving an old discussion. Many languages and build tools rely on environment variables, so those variables are not global, but rather local to a project. In Python, for instance, the standard way to choose a particular version of the interpreter and of various packages is by setting the PATH and perhaps PYTHONPATH variables. It's a dumb and simple system, which has its advantages. If you are working on two projects with different requirements, you need to either launch an Emacs instance for each project, which is the pedestrian option, or have buffer-local environment variables. There are packages out there to help setting the environment on a buffer-local basis, e.g. https://melpa.org/#/envrc