GNU bug report logs - #64644
emacs-next eshell-tramp not working when ssh to non Guix System

Previous Next

Package: guix;

Reported by: Moisés Simón <msv <at> posteo.org>

Date: Sat, 15 Jul 2023 09:45:01 UTC

Severity: normal

To reply to this bug, email your comments to 64644 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#64644; Package guix. (Sat, 15 Jul 2023 09:45:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Moisés Simón <msv <at> posteo.org>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Sat, 15 Jul 2023 09:45:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Moisés Simón <msv <at> posteo.org>
To: bug-guix <at> gnu.org
Subject: emacs-next eshell-tramp not working when ssh to non Guix System
Date: Sat, 15 Jul 2023 09:17:28 +0000
emacs-next eshell tramp can't execute external command on non Guix
system when ssh this is:

> eshell internal command work
/ssh:admin <at> deepblue.local:~ $ ls 
00-installer-config.yaml  Repositories  management  transfer_0145.out
> external commands don't work
/ssh:admin <at> deepblue.local:~ $ id
sh: cd: /home/admin/: No such file or directory
///269dceab5ed29f1610133abb297d9507#$ exit
/ssh:admin <at> deepblue.local:~ $

<reily> reports the same error
[[https://logs.guix.gnu.org/guix/2023-07-13.log#211903]] and has some
done some debbuging.  I paste the relevant parts:

--8<---------------cut here---------------start------------->8---
IRC channel logs

<reily>I'm having some troubles using TRAMP in emacs to connect to a non-guix system. I am able to use TRAMP to open and edit files, but running commands in eshell results in the error "sh: cd: /some/dir/: No such file or directory." (where /some/dir/ is a directory that absolutely exists on the remote system). After this, the eshell prompt changes to the value of tramp-end-of-output until exit is run. This does not happen when using
<reily>eshell-builtin commands, or when using shell-mode. Has anyone else encountered this?

<reily>Guest28: My guix is up to date and I use emacs-pgtk-next


<lilyp>reily: could you dig into tramp via edebug and see what command actually gets executed on the remote?

<reily>lilyp: This is what tramp-debug shows: https://paste.debian.net/1285797/

<reily>lilyp: A lot of the junk seems to come from having emacs-eat enabled. Disabling that results in this: https://paste.debian.net/1285799/
<lilyp>and this ls succeeds or not?

<reily>lilyp: I just spent a long time working my way down the edebug callstack for sending a command, to find out at the end its just running make-process, and appears to be doing so correctly. make-process is a C function, so I cant really get any more insight into whats going on until it resurfaces in the tramp logs. Any advice?
<reily>Update, it looks like TRAMP is trying to run the command on the local host instead of the remote, as making the corresponding directory on the local machine results in "/usr/bin/ls: No such file or directory." Again, this file exists at this location on the remote, just not the local host. Any idea why eshell and tramp only have this behavior when connnecting to a non-guix host? Everything works fine when connecting to another guix
<lilyp>sneek later tell reily our emacs ships with some workaround to fix tramp as the receiving end but I don't have the means to debug it as sending end, sadly
<sneek>Will do.

--8<---------------cut here---------------end--------------->8---


The oldest system I have that is experiencing the problem is:
--8<---------------cut here---------------start------------->8---
(list (channel
        (name 'guix)
        (url "https://git.savannah.gnu.org/git/guix.git")
        (branch "master")
        (commit
          "cbc14b3baea457cf2718b85f767d39ff3911ce91")
        (introduction
          (make-channel-introduction
            "9edb3f66fd807b096b48283debdcddccfea34bad"
            (openpgp-fingerprint
              "BBB0 2DDF 2CEA F6A8 0D1D  E643 A2A0 6DF2 A33A 54FA"))))
      (channel
        (name 'my-guix)
        (url "/home/msv/src/guix-config/")
        (branch "master")
        (commit
          "c19ddf3edd8688f9982d9c6f89b58f330a9aa637"))
      (channel
        (name 'nonguix)
        (url "https://gitlab.com/nonguix/nonguix")
        (branch "master")
        (commit
          "15e5924de8696cc4a19a8f508501d07f799650e1")
        (introduction
          (make-channel-introduction
            "897c1a470da759236cc11798f4e0a5f7d4d59fbc"
            (openpgp-fingerprint
              "2A39 3FFF 68F4 EF7A 3D29  12AF 6F51 20A0 22FB B2D5")))))
--8<---------------cut here---------------end--------------->8---




Information forwarded to bug-guix <at> gnu.org:
bug#64644; Package guix. (Mon, 17 Jul 2023 14:27:01 GMT) Full text and rfc822 format available.

Message #8 received at 64644 <at> debbugs.gnu.org (full text, mbox):

From: Moisés Simón <msv <at> posteo.org>
To: 64644 <at> debbugs.gnu.org
Subject: Re: bug#64644: emacs-next eshell-tramp not working when ssh to non
 Guix System
Date: Mon, 17 Jul 2023 12:35:39 +0000
the Emacs commit that broke eshell/tramp on Guix is
cee1cbfd54375cdece23d4741ced6b0c7091f6d9

output fo magit bisect follows:

--8<---------------cut here---------------start------------->8---
Head:     cee1cbfd543 Improve handling of $PATH in Eshell for remote directories
Tags:     emacs-28.2 (159665), emacs-29.0.90 (4434)

cee1cbfd54375cdece23d4741ced6b0c7091f6d9 is the first bad commit
commit cee1cbfd54375cdece23d4741ced6b0c7091f6d9
Author: Jim Porter <jporterbugs <at> gmail.com>
Date:   Thu Sep 15 12:24:37 2022 -0700
    Improve handling of $PATH in Eshell for remote directories
    
    * lisp/eshell/esh-util.el (eshell-path-env, eshell-parse-colon-path):
    Make obsolete.
    (eshell-path-env-list): New variable.
    (eshell-connection-default-profile): New connection-local profile.
    (eshell-get-path): Reimplement using 'eshell-path-env-list'; add
    LITERAL-P argument.
    (eshell-set-path): New function.
    
    * lisp/eshell/esh-var.el (eshell-variable-aliases-list): Add entry for
    $PATH.
    (eshell-var-initialize): Add 'eshell-path-env-list' to
    'eshell-subcommand-bindings'.
    
    * lisp/eshell/esh-ext.el (eshell-search-path): Use 'file-name-concat'
    instead of 'concat'.
    (eshell/addpath): Use 'eshell-get-path' and 'eshell-set-path'.
    
    * lisp/net/tramp-integration.el: Only apply Eshell hooks when
    'eshell-path-env-list' is unbound.
    
    * test/lisp/eshell/esh-var-tests.el
    (esh-var-test/path-var/local-directory)
    (esh-var-test/path-var/remote-directory, esh-var-test/path-var/set)
    (esh-var-test/path-var/set-locally)
    (esh-var-test/path-var-preserve-across-hosts): New tests.
    
    * test/lisp/eshell/esh-ext-tests.el: New file.
    
    * test/lisp/eshell/eshell-tests-helpers.el
    (with-temp-eshell): Set 'eshell-last-dir-ring-file-name' to nil.
    (eshell-tests-remote-accessible-p, eshell-last-input)
    (eshell-last-output): New functions.
    (eshell-match-output, eshell-match-output--explainer): Use
    'eshell-last-input' and 'eshell-last-output'.
    
    * doc/misc/eshell.texi (Variables): Document $PATH.
    
    * etc/NEWS: Announce this change (bug#57556).
 doc/misc/eshell.texi                     | 10 +++++
 etc/NEWS                                 |  5 +++
 lisp/eshell/esh-ext.el                   | 23 +++++-----
 lisp/eshell/esh-util.el                  | 55 ++++++++++++++++++++---
 lisp/eshell/esh-var.el                   | 12 ++++-
 lisp/net/tramp-integration.el            | 21 ++++-----
 test/lisp/eshell/esh-ext-tests.el        | 76 ++++++++++++++++++++++++++++++++
 test/lisp/eshell/esh-var-tests.el        | 60 +++++++++++++++++++++++++
 test/lisp/eshell/eshell-tests-helpers.el | 32 +++++++++++---
 9 files changed, 257 insertions(+), 37 deletions(-)
 create mode 100644 test/lisp/eshell/esh-ext-tests.el

Bisect Rest (1)
cee1cbfd543 * @ Improve handling of $PATH in Eshell for remote directories

Bisect Log (20)
git bisect start 'emacs-29.0.91' 'd9732425a6b339d83332f265da32fc3802357701'
3aef46e466f bad Merge branch 'emacs-29' of git.sv.gnu.org:/srv/git/emacs into emacs-29
d9732425a6b good Don't create unused file rmail-loaddefs.el

git bisect skip 2eb2eb0c9ead205935be58ce9bb54465d48b20c8
2eb2eb0c9ea skip ; * emoji.el (emoji--define-transient): Adapt to recent changes in transient.

git bisect skip 8b8038494ce8354a3e2cfffebba40dbd1328ebb9
8b8038494ce skip * src/gnutls.c (Fgnutls_available_p): Avoid duplicating capabilities.

git bisect skip abfe41cc2c2932525844d9d1cef83bf877145bf4
abfe41cc2c2 skip Prepare to sumbit to gnu elpa

git bisect good 8ec7f8f1699ca1ab4d1e75b369ea231f5802f0e3
8ec7f8f1699 good Update Unicode support to Unicode version 15.0.0 (bug#57846)

git bisect skip f35dc7058b22a6c7bca23c6696b815f137427fb0
f35dc7058b2 skip Add sqlite library version string retrieval function (bug#58766)

git bisect bad fafcf02c856ef8fd712ff75e8999dfb0f6d97f07
fafcf02c856 bad Fix syntax tables of tree-sitter modes (bug#59807)

git bisect bad 8721e87a6ec0874057f83f54498a0e3a64475a53
8721e87a6ec bad ; * etc/ERC-NEWS: Mention move to erc-common.el.

git bisect bad e08e9bc40f2c309bf119659a6496759493bd35e1
e08e9bc40f2 bad Remove modifications to the list of ignored files in source packages

git bisect good abe83f76de36bc3922b410f9872065fc3903738b
abe83f76de3 good Merge from origin/emacs-28

git bisect good 36ab1644964ae5a933bd9808536f60d4ae64c99f
36ab1644964 good Improve error message from sqlite-execute

git bisect good b9aff5fdb89092b68ebd7782c8dc85e6daca14b2
b9aff5fdb89 good Fix spurious "Compilation finished" native-comp messages

git bisect good 1a5e705dda54b74686cdc31543e4783a1f3337e1
1a5e705dda5 good ; * lisp/vc/vc-cvs.el (vc-cvs-clone): Remove function

git bisect skip 86581698acc1a0991592e018c1ba749f3ded21be
86581698acc skip Fix faulty loaddefs detection

git bisect bad 254536e41bf5fb62263206edb3c2d734f9cd50ef
254536e41bf bad Regenerated ldefs-boot.el

git bisect good 1beb389e472ab8132b478c9f24dd0ab6b7398670
1beb389e472 good ; Remove over-quoting of :application values in connection-local variables

git bisect bad 0954689cb3243e3af4b0c12c08bdcad608fd8433
0954689cb32 bad ; Fix some invalid Eshell syntax in an example

git bisect good 7c41016fca5ab0638f1e2fed260e2ee41f3400c2
7c41016fca5 good Allow setting the values of variable aliases in Eshell

git bisect bad cee1cbfd54375cdece23d4741ced6b0c7091f6d9
cee1cbfd543 bad Improve handling of $PATH in Eshell for remote directories

cee1cbfd54375cdece23d4741ced6b0c7091f6d9 is the first bad commit
--8<---------------cut here---------------end--------------->8---




This bug report was last modified 292 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.