GNU bug report logs - #18782
24.3; Eshell constructs bad path when executing script in current directory on remote host

Previous Next

Package: emacs;

Reported by: rekado <rekado <at> elephly.net>

Date: Tue, 21 Oct 2014 09:48:01 UTC

Severity: normal

Found in version 24.3

Fixed in version 25.1

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

Bug is archived. No further changes may be made.

Full log


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

From: Michael Albinus <michael.albinus <at> gmx.de>
To: rekado <rekado <at> elephly.net>
Cc: 18782 <at> debbugs.gnu.org
Subject: Re: bug#18782: 24.3;
 Eshell constructs bad path when executing script in current directory
 on remote host
Date: Fri, 19 Dec 2014 17:36:49 +0100
rekado <rekado <at> elephly.net> writes:

> In Eshell this does not work:
>
>     ~ $ cd /remote:~
>     /ssh:remote:/home/rekado $ ./my-script.sh
>     env: /ssh:remote:/home/rekado/my-script.sh: No such file or directory
>     /ssh:remote:/home/rekado $ 

I've debugged this problem. Looks like the following patch in eshell
solves it:

--8<---------------cut here---------------start------------->8---
*** /usr/local/src/emacs/lisp/eshell/esh-ext.el.~master~	2014-12-19 17:33:32.333535651 +0100
--- /usr/local/src/emacs/lisp/eshell/esh-ext.el	2014-12-19 16:21:34.443196286 +0100
***************
*** 296,301 ****
--- 296,306 ----
        (let ((fullname (if (file-name-directory file) file
  			(eshell-search-path file)))
  	    (suffixes eshell-binary-suffixes))
+ 	(if (and fullname
+ 		 (not (file-remote-p fullname))
+ 		 (file-remote-p default-directory))
+ 	    (setq fullname (expand-file-name
+ 			    (concat "./" fullname) default-directory)))
  	(if (and fullname (not (or eshell-force-execution
  				   (file-executable-p fullname))))
  	    (while suffixes
--8<---------------cut here---------------end--------------->8---

Could you, please, check?

Best regards, Michael.




This bug report was last modified 10 years and 204 days ago.

Previous Next


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