[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: relative remote path fails on 3rd evaluation
From: |
Michael Albinus |
Subject: |
Re: relative remote path fails on 3rd evaluation |
Date: |
Tue, 17 Aug 2010 06:59:10 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Dan Davison <address@hidden> writes:
Hi,
> Evaluating this expression works as expected the first two times:
>
> (let ((default-directory "/address@hidden:bench/"))
> (shell-command "ls" "*shell output*"))
>
> In this case it happens to result in this output:
>
> Papilio aslink
>
> However, on the third time I get
>
> sh: cd: bench/: No such file or directory
> Papilio aslink
>
> The remote directory ~/bench exists. What seems to be happening is that
> tramp has attempted to cd into ~/bench/bench, which does not exist. This
> is presumably because tramp has cached some connection information,
> although I am a bit surprised that this kicks in on the third evaluation
> and not the second. Calling `tramp-cleanup-all-connections' resets
> things so that the first two evaluations work again and the third
> generates the error message.
>
> I can get round this by using absolute remote paths, but I feel that
> this should not be happening with relative paths?
The following patch shall fix it:
--8<---------------cut here---------------start------------->8---
*** /home/albinus/src/tramp/lisp/tramp.el.~2.812.~ 2010-08-10
10:04:39.000000000 +0200
--- /home/albinus/src/tramp/lisp/tramp.el 2010-08-17 06:29:52.824765570
+0200
***************
*** 4646,4652 ****
v (format "\\cd %s; %s"
(tramp-shell-quote-argument localname)
command)
! nil t))
;; We should show the output anyway.
(when outbuf
(with-current-buffer outbuf
--- 4646,4652 ----
v (format "\\cd %s; %s"
(tramp-shell-quote-argument localname)
command)
! t t))
;; We should show the output anyway.
(when outbuf
(with-current-buffer outbuf
--8<---------------cut here---------------end--------------->8---
I've committed it to the repositories. Tramp 2.1.19, including this
patch, will be released next days, and it will be synched with the
Emacs-23 branch.
> Dan
Thanks for the report, and best regards, Michael.