[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tramp (2.0.8); Unable to edit remote files using Tramp

From: Kai Großjohann
Subject: Re: tramp (2.0.8); Unable to edit remote files using Tramp
Date: Sun, 04 Aug 2002 10:49:26 +0200
User-agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.3.50 (i686-pc-linux-gnu)

Krishnakumar B <address@hidden> writes:

> I get a message
> tramp-send-command-and-check: Couldn't find exit status of `ls -d /'
> after a series of other messages.

This usually means that Tramp and the remote end got out of sync
somewhere.  And the debug buffer confirms this.

> tramp_executable /pkg/gnu2k1/bin/bash
> # Starting remote shell `/pkg/gnu2k1/bin/bash --norc' for tilde expansion...
> $ PS1='$ ' ; exec /pkg/gnu2k1/bin/bash --norc
> bash-2.05$ $ echo hello
> # Waiting for remote `/pkg/gnu2k1/bin/bash --norc' to start up...
> # Waiting for remote `/pkg/gnu2k1/bin/bash --norc' to start up...done
> # Finding command to check if file exists
> $ ls -d / 2>/dev/null; echo tramp_exit_status $? 
> hello

This is where Tramp is getting confused: the "hello" appears at the
wrong moment for some reason.

> *tramp/scp ace*
> ---------------
> hello
> /
> tramp_exit_status 0
> /////

Here it shows that the the "hello" even arrives between some slashes
from the shell prompt.  Strange.

Please try this patch.  It probably doesn't solve the problem, but it
adds more debugging output.  I will also commit this to the CVS in a
couple of minutes, so you can also check it out from there.

Index: lisp/tramp.el
RCS file: /cvsroot/tramp/tramp/lisp/tramp.el,v
retrieving revision 2.167
diff -u -r2.167 tramp.el
--- lisp/tramp.el       3 Aug 2002 20:52:41 -0000       2.167
+++ lisp/tramp.el       4 Aug 2002 08:44:34 -0000
@@ -3501,18 +3501,22 @@
        5 "Starting remote shell `%s' for tilde expansion..." shell)
        multi-method method user host
-       (concat "PS1='$ ' ; exec " shell)) ;
+       (concat "PS1='$ ' exec " shell)) ;
       (unless (tramp-wait-for-regexp
                (get-buffer-process (current-buffer))
-               60 (format "\\(\\$ *\\|\\(%s\\)\\'\\)" shell-prompt-pattern))
+               60 (format "\\(\\$ *\\|\\(%s\\)\\)\\'" shell-prompt-pattern))
         (pop-to-buffer (buffer-name))
         (error "Couldn't find remote `%s' prompt." shell))
+      (tramp-message
+       10 "Setting remote shell prompt...")
       (process-send-string nil (format "PS1='%s%s%s'; PS2=''; PS3=''%s"
+      (tramp-message
+       10 "Setting remote shell prompt...done")
       (tramp-send-command multi-method method user host "echo hello")
       (tramp-message 5 "Waiting for remote `%s' to start up..." shell)
       (unless (tramp-wait-for-output 5)
@@ -5654,6 +5658,12 @@
 If you can give a simple set of instructions to make this bug happen
 reliably, please include those.  Thank you for helping kill bugs in
+Another useful thing to do is to put (setq tramp-debug-buffer t) in
+the ~/.emacs file and to repeat the bug.  Then, include the contents
+of the *tramp/foo* buffer and the *debug tramp/foo* buffer in your bug
 --bug report follows this line--")))
 (defalias 'tramp-submit-bug 'tramp-bug)

A large number of young women don't trust men with beards.  (BFBS Radio)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]