From: Xiaoyue Chen <xchen@vvvu.org>
To: 67126@debbugs.gnu.org
Subject: bug#67126: eshell breaking tramp-remote-path
Date: Sun, 12 Nov 2023 08:52:00 +0000 (UTC) [thread overview]
Message-ID: <87y1f3s6a9.fsf@vvvu.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 1478 bytes --]
Tags: patch
Hello,
Commit 2af092741e5 broke tramp-remote-path, making eshell unusable for
sudo, ssh, etc. So any emacs version after that is effected. I found the
issue on emacs 29.1.90.
Steps to reproduce:
1. emacs -Q
2. Evaluate the following
(require 'eshell)
(add-to-list 'eshell-modules-list 'eshell-tramp)
(require 'tramp)
(add-to-list 'tramp-remote-path 'tramp-own-remote-path)
3. M-x eshell
4. Type "sudo uname" and press Enter
5. The output is erroneous
sh: /home/xchen/env: No such file or directory
///374ad82e298d0a7279e9e4c98722b9f5#$
The cause is a minor error in eshell-gather-process-output
(when (file-remote-p default-directory)
(push (concat "PATH=" real-path) process-environment)
(setq tramp-remote-path (eshell-get-path)))
tramp-remote-path should not contain the remote part of the directories,
so use (eshell-get-path t) fixes it.
Attached is a simple patch to fix this issue.
/Xiaoyue
In GNU Emacs 29.1.90 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo
version 1.16.0, Xaw3d scroll bars)
Repository revision: emacs-29.1.90
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101008
System Description: NixOS 23.11 (Tapir)
Configured using:
'configure
--prefix=/nix/store/0hkpjpd4nh282znb7z225iramjcgrv0n-emacs-unstable-29.1.90
--disable-build-details --with-modules --with-x-toolkit=lucid
--with-xft --with-cairo --with-native-compilation --with-tree-sitter'
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: eshell.patch --]
[-- Type: text/patch, Size: 730 bytes --]
diff --git a/lisp/eshell/esh-proc.el b/lisp/eshell/esh-proc.el
index 6561561440e..e7e91f08741 100644
--- a/lisp/eshell/esh-proc.el
+++ b/lisp/eshell/esh-proc.el
@@ -304,7 +304,7 @@ Used only on systems which do not support async subprocesses.")
;; future, remember to remove `tramp-remote-path' above, too.)
(when (file-remote-p default-directory)
(push (concat "PATH=" real-path) process-environment)
- (setq tramp-remote-path (eshell-get-path)))
+ (setq tramp-remote-path (eshell-get-path t)))
;; MS-Windows needs special setting of encoding/decoding, because
;; (a) non-ASCII text in command-line arguments needs to be
;; encoded in the system's codepage; and (b) because many Windows
[-- Attachment #3: Type: text/plain, Size: 39 bytes --]
--
Xiaoyue Chen
VVVU: Workers, Unite!
next reply other threads:[~2023-11-12 8:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-12 8:52 Xiaoyue Chen [this message]
2023-11-12 20:18 ` bug#67126: eshell breaking tramp-remote-path Jim Porter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y1f3s6a9.fsf@vvvu.org \
--to=xchen@vvvu.org \
--cc=67126@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.