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 17:19:37 +0200 Message-ID: <87eeadzjee.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> <87lf4l91nb.fsf@gmx.de> <87czpxk9mi.fsf@gmail.com> <87h7f99073.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="19301"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Michael Albinus , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Aug 28 17:20:58 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 1mK08f-0004mW-UW for ged-emacs-devel@m.gmane-mx.org; Sat, 28 Aug 2021 17:20:57 +0200 Original-Received: from localhost ([::1]:52632 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mK08e-0004c0-KJ for ged-emacs-devel@m.gmane-mx.org; Sat, 28 Aug 2021 11:20:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37198) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mK07S-0003RM-5P for emacs-devel@gnu.org; Sat, 28 Aug 2021 11:19:42 -0400 Original-Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:41966) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mK07Q-00080t-Lv for emacs-devel@gnu.org; Sat, 28 Aug 2021 11:19:41 -0400 Original-Received: by mail-wr1-x42f.google.com with SMTP id u9so15202055wrg.8 for ; Sat, 28 Aug 2021 08:19:40 -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=Qt8WXAX5OLEOIC4EhFihxhc9L5HAEVknOeeFijgX0nw=; b=NFhuJji5PlSAc85I99Sq4V2G5NS5VxY18Px7V2C7Mzqy7Qwl9idnqij1q7kC4JtviI GXO5kt9rxsvzzijoyaSfa6nkDF7lIYWEfhbwvwpBQd+rsgubYb7Emx+0MnpQRiT5oAhX 1M8Z0xqGxA/xfiyPhDIPx9m7R5obFDbezKoC6OEl/JZZCRdm0m6DNkc3kN8UXBtrXWgZ Jw/gF0XAamkCVhHCuaiagMA2skcuyd+lBd/MwU4Mumu38ztLV6L5XQ+EP/JrpYUO2VYQ JTbvWkvcexDmg7t/cGsi2uqyhDjouATYFYkY3fMp2yGsckDGXOhueI0f8SUg0CfNcDTM xk0Q== 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=Qt8WXAX5OLEOIC4EhFihxhc9L5HAEVknOeeFijgX0nw=; b=GsddJpQkh4hdEa4tPFWCZ72Q465VrqCWoFrHNbnG3XQb8WLf6R74cyYmyeXi8ZH1wn pgyh8bs6uQQV36ZXTNCbPS5sIOXOtCI3v6mHxfpRmkSrtch/CSX2t/r4BhGfWaDqawOr 3pzogYl16bFlyIt8LeRWHDo+X0cPJsl0toRpJKI/B8PZPrq/bGJQTpHX++Cn0sG91gfL /qbWAWqp+crYK5NWCeYGNlF7atN8C7ppwGKOR3opaJ6v8jFicNm3c07ocdBORZZ0JgJV JVoTOX59mvhloUDnSft+weyn3OlPyz5y7Yx2JaCqrCbpKr6Aw1K4wEZMSOoRsS55+LKo fqJQ== X-Gm-Message-State: AOAM532ofXXzjybB5ZosSwo+qnsmp1078NnYLf3qpd4uNwQ3KkMIYSOR bYGnfP3jmeMdY4PBb7/WNQiydficd9z70Q== X-Google-Smtp-Source: ABdhPJxVaJkDYdyCofDCJqS3fmoQIyAKgo8COg7qHW6tRRpKR09prgYuJhnvHoTYirLp/8YYBtA1gQ== X-Received: by 2002:adf:9f4b:: with SMTP id f11mr16525918wrg.337.1630163978934; Sat, 28 Aug 2021 08:19:38 -0700 (PDT) Original-Received: from ars3 ([2a02:8109:8ac0:56d0::ae3f]) by smtp.gmail.com with ESMTPSA id f23sm13164553wmc.3.2021.08.28.08.19.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Aug 2021 08:19:38 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Sat, 28 Aug 2021 10:05:24 -0400") Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=arstoffel@gmail.com; helo=mail-wr1-x42f.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:273323 Archived-At: On Sat, 28 Aug 2021 at 10:05, Stefan Monnier wrote: > Michael Albinus [2021-08-28 15:18:56] wrote: >> Augusto Stoffel writes: >> >>>> W/o further reading, this cannot be right. Elements of >>>> `process-environment' have always the syntax "VAR=VALUE". You add only a >>>> VALUE (`exec-path') in `bufferenv'. I understand your intention, using >>>> `bufferenv' as transportation vehicle, but I believe this is >>>> mis-designed, and good for trouble. If not now, then later. >>> >>> This is a temporary, lexical variable that is inaccessible to the user >>> directly. It's "destructured" again in the next hunk of the patch. >> >> I've seen this. But we shall avoid this dirty kind of programming, even >> if it is internal only. > > I don't see anything dirty about it. I agree, but since we are here we can discuss where we want to be slightly wrong: (1) when `process-environment' is local but `exec-path' isn't or (2) when `process-environment' or `exec-path' is nil The first patch suffers from (1), the second from (2). > > I think you're just getting confused by the fact that the code uses > `cons` to build a pair of a string and a list and you read it as adding > add a string to the list. > > Maybe the confusion would be avoided by switching the two (i.e. use > `(cons process-environment exec-path)`). > > > Stefan