GNU bug report logs - #8089
Eshell remote files fix (patch)

Previous Next

Package: emacs;

Reported by: Seppo Sade <sepposade1 <at> gmail.com>

Date: Sun, 20 Feb 2011 20:09:01 UTC

Severity: normal

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 8089 in the body.
You can then email your comments to 8089 AT debbugs.gnu.org in the normal way.

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

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


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8089; Package emacs. (Sun, 20 Feb 2011 20:09:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Seppo Sade <sepposade1 <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 20 Feb 2011 20:09:02 GMT) Full text and rfc822 format available.

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

From: Seppo Sade <sepposade1 <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Eshell remote files fix (patch)
Date: Sun, 20 Feb 2011 22:02:45 +0200
[Message part 1 (text/plain, inline)]
The following currently fails in Eshell:

$ sudo bzgrep # Or any shell script in PATH
/bin/sh: /sudo:root <at> localhost:/usr/bin/bzgrep: No such file or directory

This is apparently so because eshell/sudo translates that to a Tramp remote
location, but eshell-external-command fails to handle it as a remote
command. It instead passes the default-directory containing Tramp syntax
directly to the command (shell script), which obviously fails as it doesn't
understand Tramp syntax. The patch below fixes this issue. (Was there any
specific reason for earlier only considering "ftp" being remote, instead of
all Tramp methods?)

--- esh-ext.el.orig     2011-02-18 20:57:50.000000000 +0200
+++ esh-ext.el  2011-02-18 20:58:12.000000000 +0200
@@ -203,7 +203,7 @@
 (defun eshell-external-command (command args)
   "Insert output from an external COMMAND, using ARGS."
   (setq args (eshell-stringify-list (eshell-flatten-list args)))
-  (if (string-equal (file-remote-p default-directory 'method) "ftp")
+  (if (file-remote-p default-directory)
       (eshell-remote-command command args))
   (let ((interp (eshell-find-interpreter command)))
     (assert interp)
[Message part 2 (text/html, inline)]

Reply sent to Michael Albinus <michael.albinus <at> gmx.de>:
You have taken responsibility. (Tue, 22 Feb 2011 05:55:02 GMT) Full text and rfc822 format available.

Notification sent to Seppo Sade <sepposade1 <at> gmail.com>:
bug acknowledged by developer. (Tue, 22 Feb 2011 05:55:02 GMT) Full text and rfc822 format available.

Message #10 received at 8089-done <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Seppo Sade <sepposade1 <at> gmail.com>
Cc: 8089-done <at> debbugs.gnu.org
Subject: Re: bug#8089: Eshell remote files fix (patch)
Date: Tue, 22 Feb 2011 06:54:45 +0100
Seppo Sade <sepposade1 <at> gmail.com> writes:

> The following currently fails in Eshell:
>
> $ sudo bzgrep # Or any shell script in PATH
> /bin/sh: /sudo:root <at> localhost:/usr/bin/bzgrep: No such file or
> directory
>
> This is apparently so because eshell/sudo translates that to a Tramp
> remote location, but eshell-external-command fails to handle it as a
> remote command. It instead passes the default-directory containing
> Tramp syntax directly to the command (shell script), which obviously
> fails as it doesn't understand Tramp syntax. The patch below fixes
> this issue.

Thanks for the report. I've applied your patch to the trunk (aka Emacs 24).

> (Was there any specific reason for earlier only considering "ftp"
> being remote, instead of all Tramp methods?)

Historical reasons. Originally, eshell used ange-ftp for remote
connections.

Best regards, Michael.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 22 Mar 2011 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 14 years and 154 days ago.

Previous Next


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