unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#8089: Eshell remote files fix (patch)
@ 2011-02-20 20:02 Seppo Sade
  2011-02-22  5:54 ` Michael Albinus
  0 siblings, 1 reply; 2+ messages in thread
From: Seppo Sade @ 2011-02-20 20:02 UTC (permalink / raw)
  To: 8089

[-- Attachment #1: Type: text/plain, Size: 1157 bytes --]

The following currently fails in Eshell:

$ sudo bzgrep # Or any shell script in PATH
/bin/sh: /sudo:root@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)

[-- Attachment #2: Type: text/html, Size: 1559 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-02-22  5:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-20 20:02 bug#8089: Eshell remote files fix (patch) Seppo Sade
2011-02-22  5:54 ` Michael Albinus

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).