From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter Newsgroups: gmane.emacs.bugs Subject: bug#74550: eshell cannot set the environment variable PATH on Windows Date: Wed, 27 Nov 2024 10:52:47 -0800 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23592"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 74550@debbugs.gnu.org To: Siyuan Chen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 27 19:54:27 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1tGNBC-0005yr-Qz for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 27 Nov 2024 19:54:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tGNAr-0006qI-IH; Wed, 27 Nov 2024 13:54:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tGNAp-0006px-Np for bug-gnu-emacs@gnu.org; Wed, 27 Nov 2024 13:54:03 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tGNAp-0004cA-E9 for bug-gnu-emacs@gnu.org; Wed, 27 Nov 2024 13:54:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=In-Reply-To:From:References:MIME-Version:Date:To:Subject; bh=WBswkJW3w7NxTqBCuD5yIRhsLI1gX8JFkY23Sdb2iLY=; b=OT/e7OL2UmDGQAdVotXziiGrckwL0YrvY3iARYwQ0eFYDfCH/EjLi9VHK3cODA1BYD1b5j6F3Ea7kovQE6rKovAmK31/8L0iA1JS8tc8CYProtmh/en/N/js+it4ff1WKBIJWw4KoHXrXbaMbLmox2xd/EGaNQlD/ZrNKGqbL7b/uV4Mrb+dIzGwaTK19QTlzUq6qzntZBRNWMBPK3iwb+APp7YKZfam9J3QsD5+T4ZZ3kvPqD2L1ZZ+PJRiMowg2FHq6WRk9u1FIlPCdjuPCgM2zmYsDBnaVKU8XQGXP3IZut0g0K3R4nendbk4M+V8RN6bCLXbmTdGEutd5koWLw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tGNAo-0004Jc-4A for bug-gnu-emacs@gnu.org; Wed, 27 Nov 2024 13:54:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Jim Porter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 27 Nov 2024 18:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74550 X-GNU-PR-Package: emacs Original-Received: via spool by 74550-submit@debbugs.gnu.org id=B74550.173273363116569 (code B ref 74550); Wed, 27 Nov 2024 18:54:02 +0000 Original-Received: (at 74550) by debbugs.gnu.org; 27 Nov 2024 18:53:51 +0000 Original-Received: from localhost ([127.0.0.1]:34552 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tGNAc-0004JB-Kz for submit@debbugs.gnu.org; Wed, 27 Nov 2024 13:53:50 -0500 Original-Received: from mail-pl1-f178.google.com ([209.85.214.178]:46170) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tGNAb-0004J1-KH for 74550@debbugs.gnu.org; Wed, 27 Nov 2024 13:53:50 -0500 Original-Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-20cf3e36a76so241125ad.0 for <74550@debbugs.gnu.org>; Wed, 27 Nov 2024 10:53:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732733568; x=1733338368; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=WBswkJW3w7NxTqBCuD5yIRhsLI1gX8JFkY23Sdb2iLY=; b=FgKfljcCghTkHIecZu6d18MTwNFvz0KLqcsvM/VolTZTR3UOKdhMxCCmCAjemewsqV eUSGLbdsxVOKxw8rK2maIOQIVAi3kQGMDSRYQ3CNQWNatmhRcsXDfU1Akil/R8DGAiIU rhe4PNkM859CZ1R81QfSEltqBvVTsoFtM3kO0Cn+xJ3EyreDK9rjtK2vBrlRzYJ46WUK OHjaFrRqK5U3cveaTT/MLLguSbiQVqh/xwWZpReFRIde2zbUJ52fCXSvaO0lYnyxsQlU stXHySidS7XMO2FNDvLzd57eoxNXHCNN1atChyYU4L71sElh3hj5Hf1t2zo/+TYkLH1i bLdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732733568; x=1733338368; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=WBswkJW3w7NxTqBCuD5yIRhsLI1gX8JFkY23Sdb2iLY=; b=lRYJVvlnEPaSBQNbYWZ1NTrJxztcyXHBT3q2rhz4tc3xVXLqj+R3tyTJdK4edZAL+Y TyDnWc00K8l5IX3kLg8sBuuCgyHvFePMp7QfD7V9hgcAeCCSSz1m7EDMVPVOLGCtWftj wTW3mg12+MX1GRuYK+8SVAeKiFhI8nB+vIivSC4Hvs7r+Gancf8wIbIFkozOJ0EKfLKM aUUQHTirAdXchIGkBtKsJQ3afGhrsmlQw+uQZ77mDELKSXfjQUMugpx6Jzwve4JaIyUm 09ble9YFKcWP/qghE9jQfgqgMUuUPlfUrYve84RSSOhz7aiNaA2FY2wAOEoJt7Raqul0 hhEQ== X-Gm-Message-State: AOJu0YwrTWZ1pW+0n3l+zeadmIvsPj6SIjQUGnuyEiSXEVHsk+y6iJ0G tj7fk6PLg9z++6KSi0uMr142fwLgWRWwOMixK6ik2jJTDtNWHODD X-Gm-Gg: ASbGncs9lzbNXgliBTIM4HzF6Dtlk73T0SMbCEj56WDWownZgkH1QwX0WZMwQrnfQWM PFwz+a7ngsf95tDGq8eaMG79V4/saep/WgWQQqd9C2e8m61X/BXP/zI14Y4VuWaaFEV7sDoS2lq ZhvWo/AZuYsWze2Vnfv7E7JgfuCLCJDx1z8RnVOaypHoPangKTxUdxOrVlPd8r9PlXPEKl/ec6r gQuP8TyaDoDuJpHmSAeNgz04VyDcDVOKDzkxPgAjKkms6DNcA5CnsmmIXuhFG8RLedYLcqIIZu+ 283wHTxyHPNSCTp4+rY64pSXYEk= X-Google-Smtp-Source: AGHT+IFUJhdhvyPTDJpTHcyiNAmfFkvkhyM4AgPCkMUEjN8vmB5KvKWC6Dx3RkkwwVQ//FOHyj8u8A== X-Received: by 2002:a17:903:41d1:b0:20c:5fd7:d71 with SMTP id d9443c01a7336-2150128abb4mr48074585ad.22.1732733568456; Wed, 27 Nov 2024 10:52:48 -0800 (PST) Original-Received: from [192.168.1.2] (syn-023-240-098-037.res.spectrum.com. [23.240.98.37]) by smtp.googlemail.com with ESMTPSA id d9443c01a7336-2129db8c404sm106490975ad.40.2024.11.27.10.52.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 27 Nov 2024 10:52:48 -0800 (PST) Content-Language: en-US In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:296037 Archived-At: On 11/27/2024 9:15 AM, Siyuan Chen wrote: > It works, thanks. > > However, this seems to be a global setting only. Is there any equivalent > of with-environment-variables for exec-path? Not exactly. However, you can use setq-local or eshell/addpath: (defun shell1 () (interactive) (let ((current-prefix-arg 4)) (call-interactively 'shell) (setq-local exec-path (cons "C:/foo" exec-path)) ;; or ... (eshell/addpath "-b" "C:/foo"))) That's probably the best way to do it for now. I think it's probably reasonable for Eshell to work correctly when you've let-bound 'exec-path' like in your examples, but I'll have to think about the best way to do it.