Dan Davison <[email protected]> writes: Hi,
> Evaluating this expression works as expected the first two times: > > (let ((default-directory "/[email protected]: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. _______________________________________________ Tramp-devel mailing list [email protected] http://lists.gnu.org/mailman/listinfo/tramp-devel
