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#57556: 28.1; Eshell not finding executables in PATH when tramp-integration loaded Date: Sat, 1 Oct 2022 15:02:04 -0700 Message-ID: References: <87h715j5gy.fsf@gmx.de> <0480c49e-75da-68c4-d255-242ff65323fe@gmail.com> <87czbsjyby.fsf@gmx.de> <877d1vthto.fsf@gmx.de> <871qrrffzj.fsf@gmx.de> 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="39521"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 57556@debbugs.gnu.org, coltonlewis@google.com To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Oct 02 00:03:12 2022 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 1oekZj-000A8l-DR for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 02 Oct 2022 00:03:11 +0200 Original-Received: from localhost ([::1]:53352 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oekZi-00032U-DD for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 01 Oct 2022 18:03:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49848) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oekZa-00032L-JJ for bug-gnu-emacs@gnu.org; Sat, 01 Oct 2022 18:03:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46730) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oekZa-0000jN-AJ for bug-gnu-emacs@gnu.org; Sat, 01 Oct 2022 18:03:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oekZa-0003ej-4b for bug-gnu-emacs@gnu.org; Sat, 01 Oct 2022 18:03:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jim Porter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 01 Oct 2022 22:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57556 X-GNU-PR-Package: emacs Original-Received: via spool by 57556-submit@debbugs.gnu.org id=B57556.166466173413999 (code B ref 57556); Sat, 01 Oct 2022 22:03:02 +0000 Original-Received: (at 57556) by debbugs.gnu.org; 1 Oct 2022 22:02:14 +0000 Original-Received: from localhost ([127.0.0.1]:45808 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oekYo-0003di-Ar for submit@debbugs.gnu.org; Sat, 01 Oct 2022 18:02:14 -0400 Original-Received: from mail-pl1-f180.google.com ([209.85.214.180]:42966) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oekYm-0003dV-Qw for 57556@debbugs.gnu.org; Sat, 01 Oct 2022 18:02:13 -0400 Original-Received: by mail-pl1-f180.google.com with SMTP id v1so6780938plo.9 for <57556@debbugs.gnu.org>; Sat, 01 Oct 2022 15:02:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id:from:to:cc :subject:date; bh=gttRn8nL5CkLVc0jhklcOr2EpOZLhvHMcu0IuzkuAqE=; b=qnUhxH0wl8R3P15FHllefBVIauoKG6iFii0ABZ/+qOBvxdIS/NsGrcLOVYHNYHPoXq dc9GCcpaXo5dqn9Why6rd9LZ/3uWKhsGzFzd3USYNBMzJhRScArelRYoaqPfp13dPIYJ LaIZYi0c8HPRg+udOPLXgt0SyoTIjzit6l/ec67zl3pv0lUz3ShFWAbfsuWOTQhXlsP4 OHWiyp3aSZl4grX7+GpqV397dJ3q0crOS5VH2sHG7LVEx4fSZ23XsupxEuP5ITv6sL1a HFEK6Olg/tKTLo9ALW16SZGYVB1deu/kMwJ1k/+GzmEbdFtvi5pCeRkuDMk7FBv34yIe WMyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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; bh=gttRn8nL5CkLVc0jhklcOr2EpOZLhvHMcu0IuzkuAqE=; b=Yx7TD9ZEfuvaNCaVbgkALEkPj9JrOiRX/e2rQAg8i3OdW8sk0/qyHbf8X1sYEuK5Xb BAvphar+szr1JQuPBU1xfrUw8gszrNlsW4iKCEWE1ao4g27MTcTsXBbbskSnrzMeLRyl OpIpVLtKZ6OG/pNF6d5VtEdu8lBmt0idOHtRhLT1bZAthUi0IR6w8nDd8zr2ZeRtIssD 53FAuN4KYRHk7gvZcjpgSbTv4qTHGXs/W7+J4jmEEmwZPSXQ9A1wR3knEQrarZqIPUwb mrXdlhpZkRPeEgUy21Y1uaeolILq5rD1usLDvIPksYQLHO9anu6CUqF/5wpniTVY9ub/ XK3w== X-Gm-Message-State: ACrzQf1tONoiTHA/u/+6AcJsqFnL9SMyg/5i7TD9pZ5GxyZRNWuML8Um VOGTHbOj04O3bSd5psbUOfg= X-Google-Smtp-Source: AMsMyM79Fye5b3YrrBcHtks4utCdZIgBQRLVBWWA4x8t5bwgeMVbxRI3WLjlch2DajzLyG2ewoNBjQ== X-Received: by 2002:a17:90a:1a0b:b0:20a:5735:3495 with SMTP id 11-20020a17090a1a0b00b0020a57353495mr4934005pjk.161.1664661726826; Sat, 01 Oct 2022 15:02:06 -0700 (PDT) Original-Received: from [192.168.1.2] (cpe-76-168-148-233.socal.res.rr.com. [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id a4-20020a17090a688400b0020396a060cdsm7444688pjd.13.2022.10.01.15.02.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 01 Oct 2022 15:02:06 -0700 (PDT) Content-Language: en-US In-Reply-To: <871qrrffzj.fsf@gmx.de> 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" Xref: news.gmane.io gmane.emacs.bugs:244167 Archived-At: On 10/1/2022 1:25 PM, Michael Albinus wrote: > Jim Porter writes: > > I didn't install your patches, but I gave them a cursory review. Thanks for taking a look. >> set ENV_VAR value >> set #'lisp-var value > > Well, in Elisp the #'symbol read syntax is used for function names, see > (info "(elisp) Special Read Syntax") > > So it is surprising to see it used for variable names. Yeah, it took me quite a while to realize that Eshell's meaning of #'symbol is different from Elisp's. I recently added some documentation in the Eshell manual to (hopefully) clarify the potential confusion. >> Patch #4: Make $PATH a variable alias >> ---------------------------------------- >> >> This stores the $PATH in an alist indexed by host, similar to >> 'grep-host-defaults-alist'. For consistency, it now derives its value >> from '(exec-path)' everywhere (formerly, it used '(getenv "PATH") for >> local hosts and '(exec-path)' for Tramp). > > Again, no possibility to use connection-local variables? You use them > already by calling (path-separator) ... I'll take a look at doing that. As I understand it, connection-local variables are cleared if the associated connection gets cleaned up, right? I wonder if that would be the right thing to do. For example, if I cd into a remote host in Eshell, then update Eshell's $PATH for that host, then clean up the connection, should the $PATH be reset to the default for that host? I'm really not sure... >> -(defun eshell-get-path () >> +(make-obsolete-variable 'eshell-path-env 'eshell-get-path "29.1") > > I guess you mean 'eshell-host-path-env' as CURRENT-NAME. I wanted to say, "Instead of using the variable 'eshell-path-env', call the function 'eshell-get-path'." Maybe that's not the right way to indicate that though. >> +(defun eshell-get-path (&optional local-part) >> + (let* ((remote (file-remote-p default-directory)) >> + (path (cdr (eshell-get-path-assq remote t)))) >> + (when (and (eshell-under-windows-p) >> + (not remote)) >> + (push "." path)) >> + (if (and remote (not local-part)) >> + (mapcar (lambda (x) (concat remote x)) path) > > Why not file-name-concat? Good point. I'd forgotten to update that when copying that bit out of 'eshell-parse-colon-path'.