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: Thu, 02 Sep 2021 09:14:33 +0200 Message-ID: <874kb378km.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> <87h7f9k9tl.fsf@gmail.com> <86zgsw1ss2.fsf@stephe-leake.org> <87czps7ee5.fsf@gmail.com> <86mtov2a75.fsf@stephe-leake.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="36278"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Eli Zaretskii , michael.albinus@gmx.de, monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Stephen Leake Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Sep 02 09:15:45 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 1mLgwq-0009Bp-Ey for ged-emacs-devel@m.gmane-mx.org; Thu, 02 Sep 2021 09:15:44 +0200 Original-Received: from localhost ([::1]:57134 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mLgwo-0006U7-H9 for ged-emacs-devel@m.gmane-mx.org; Thu, 02 Sep 2021 03:15:42 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55260) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mLgvm-0005MA-VW for emacs-devel@gnu.org; Thu, 02 Sep 2021 03:14:38 -0400 Original-Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:44860) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mLgvk-0002Ps-Ks; Thu, 02 Sep 2021 03:14:38 -0400 Original-Received: by mail-wr1-x42b.google.com with SMTP id g18so1230528wrc.11; Thu, 02 Sep 2021 00:14:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=59BK84PVCj7s+CKc1Glb2DRiUqmZY9VUtf8XsBJO7aA=; b=n5aJ4cuRDq+yINXRw6pAFIPRxIRn4rtoqof/Pbabfzxze1ioverp4cyg6nH0CnfdF7 M+jDNcdburE8xu9lEP31kbK1dPyzVYxbh8G/wJqRCB9L2cHciIciUOrJI7Od3eVlLaYR 9X2gbNPI0khis/+KDuHWxPoFD+h4U3Gn1lPl/rtcBYEeo8tz+guCa/rSUEAcsKnnSlE8 1f4D5KE+Smqllc/WZZfU9F8E9FOoD6UivWrrvBst+Tj0TBczaO6qZU4hxUJVCHF669Zr cfyhnsQEwj20w8+sjswFbEPcidRItoQRJO3VcnMX+WEFLbeOVRc60fK0GUVaMhNh2rSE /D9A== 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=59BK84PVCj7s+CKc1Glb2DRiUqmZY9VUtf8XsBJO7aA=; b=Dif49LfNp3mK7W/QQM3XUFeDSJKJUH4h/74bpO7A1GJkMIFCwd8nkxWHjnZFDMxPzO rl8jj1fZbrF4FJ6orS6XuoRyeyM/f/ObTeDkF0zqkGOMMHUE29FAMgxfIio3JV7Y+loN zs585YgGsvRVUJscP85UchEMBjz2CcztOAfV/FBtFSbDaDr1JzGUAk11LXrFKwJMugAG 1QLacRxmozUaQivSyy15TbAGquPTMDUfA3y+06rC43EV/XKvPHmBLQsNJhgJ8bSoyMA2 Lkb1wI9S+HkT6ldOQ4RY3EAmzhHiP+fMoVHJwIJ0K6LDo3nurTeftgBdU4uNgf4DB09D SVFg== X-Gm-Message-State: AOAM5335nDhmWzfe1pRkYk9oXj6SX7bFvzsO26adN4BFyP1U9xMBGtC+ CvWG+dWc3DKNEmN7rfLwy++m/s3uA1BQoQ== X-Google-Smtp-Source: ABdhPJxlm5HwbPQDPRoA71iJ6wRLr+mcUEpwehB6VpB4KmzV2FH5C8dunyZVt+uqLNEuDp76KPjumg== X-Received: by 2002:a5d:4ac2:: with SMTP id y2mr1909281wrs.296.1630566874527; Thu, 02 Sep 2021 00:14:34 -0700 (PDT) Original-Received: from ars3 ([2a02:8109:8ac0:56d0::ae3f]) by smtp.gmail.com with ESMTPSA id a133sm817061wme.5.2021.09.02.00.14.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Sep 2021 00:14:34 -0700 (PDT) In-Reply-To: <86mtov2a75.fsf@stephe-leake.org> (Stephen Leake's message of "Wed, 01 Sep 2021 15:38:22 -0700") Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=arstoffel@gmail.com; helo=mail-wr1-x42b.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:273698 Archived-At: On Wed, 1 Sep 2021 at 15:38, Stephen Leake wrote: >>> The GNU ELPA package wisi takes an intermediate approach; it maintains a >>> list of project-specific environment variables in the project object, >>> and let-binds them in process-environment whenever it runs a process for >>> the project. >> >> If I understand correctly, this works only when launching the WisiToken >> program, am I correct? > > No, any process. In ada-mode, that includes the compiler and the cross > reference tool. Okay, I've found wisi-prj.el, but I can't find any documentation for the process environment aspect of it. Therefore it's still not clear to me how it relates with this discussion. Wisi claims to be a code-parsing tool. Are there any new ideas in it that pertain to project-wise process environments specifically and could be adopted more broadly, say by project.el? At the risk of repeating myself too much, here is my idea of how project-specific environments would work: - Every command that creates a process should use the buffer-local value of `process-environment' if applicable (this is what the attached patch addresses for `compile'). - Every buffer that "belongs" to a project gets the right buffer-local value of `process-enviroment' (as well as `exec-path') by one of several possible techniques: - Via an exec directive in the dir-locals file - Using a direnv-like package such as `envrc' or `buffer-env' (both currently on MELPA).