tramp-devel
[Top][All Lists]
Advanced

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

Re: emacs hangs when connecting from windows to linux with tcsh shell


From: Peter Baranyi
Subject: Re: emacs hangs when connecting from windows to linux with tcsh shell
Date: Thu, 4 Aug 2011 13:06:57 +0200

Hi,

thank you for your help Michael. With your patch it works now, I was
able to log in!

Best regards,
Peter

On Wed, Aug 3, 2011 at 9:16 PM, Michael Albinus <address@hidden> wrote:
> Michael Albinus <address@hidden> writes:
>
>> Hi,
>
>>> Here is the interesting part of the debug:
>>>
>>> 12:34:02.703000 tramp-maybe-open-connection (3) # Found remote shell
>>> prompt on `ip.add.re.ss'
>>> 12:34:02.703000 tramp-open-shell (5) # Opening remote shell `/bin/sh'...
>>> 12:34:02.704000 tramp-get-connection-property (7) # process-name nil
>>> 12:34:02.704000 tramp-get-connection-property (7) # remote-echo nil
>>> 12:34:02.705000 tramp-send-command (6) # exec env ENV=''
>>> PROMPT_COMMAND='' PS1="#$" PS2='' PS3='' /bin/sh
>>
>> And that's what I don't understand. Tramp shall NOT send PS1="#$" (these
>> days, it sends PS1=\#\$ ). Could you, please, have a look in tramp.el,
>> and search for PS1= (just these 4 characters). I did it also, and there
>> was no evidence, that double apostrophes are sent - this is the problem.
>
> I believe I understand now. You are on Windows. And shell-quote-argument
> behaves different there.
>
> Could you, please, apply the following patch (untested, I do not work
> under Windows):
>
> --8<---------------cut here---------------start------------->8---
> *** --- /home/albinus/src/tramp-2-1-stable/lisp/tramp.el.~V-2-1-20~     
> 2011-08-03 21:09:31.544415256 +0200
> --- /home/albinus/src/tramp-2-1-stable/lisp/tramp.el    2011-08-03 
> 21:07:56.799425467 +0200
> ***************
> *** 6659,6669 ****
>        (when extra-args (setq shell (concat shell " " extra-args)))
>        (tramp-send-command
>         vec (format "exec env ENV='' PROMPT_COMMAND='' PS1=%s PS2='' PS3='' 
> %s"
> !                  (shell-quote-argument tramp-end-of-output) shell)
>         t))
>      ;; Setting prompts.
>      (tramp-send-command
> !      vec (format "PS1=%s" (shell-quote-argument tramp-end-of-output)) t)
>      (tramp-send-command vec "PS2=''" t)
>      (tramp-send-command vec "PS3=''" t)
>      (tramp-send-command vec "PROMPT_COMMAND=''" t)))
> --- 6659,6669 ----
>        (when extra-args (setq shell (concat shell " " extra-args)))
>        (tramp-send-command
>         vec (format "exec env ENV='' PROMPT_COMMAND='' PS1=%s PS2='' PS3='' 
> %s"
> !                  (tramp-shell-quote-argument tramp-end-of-output) shell)
>         t))
>      ;; Setting prompts.
>      (tramp-send-command
> !      vec (format "PS1=%s" (tramp-shell-quote-argument tramp-end-of-output)) 
> t)
>      (tramp-send-command vec "PS2=''" t)
>      (tramp-send-command vec "PS3=''" t)
>      (tramp-send-command vec "PROMPT_COMMAND=''" t)))
> ***************
> *** 6997,7003 ****
>
>    (tramp-message vec 5 "Setting shell prompt")
>    (tramp-send-command
> !    vec (format "PS1=%s" (shell-quote-argument tramp-end-of-output)) t)
>    (tramp-send-command vec "PS2=''" t)
>    (tramp-send-command vec "PS3=''" t)
>    (tramp-send-command vec "PROMPT_COMMAND=''" t)
> --- 6997,7003 ----
>
>    (tramp-message vec 5 "Setting shell prompt")
>    (tramp-send-command
> !    vec (format "PS1=%s" (tramp-shell-quote-argument tramp-end-of-output)) t)
>    (tramp-send-command vec "PS2=''" t)
>    (tramp-send-command vec "PS3=''" t)
>    (tramp-send-command vec "PROMPT_COMMAND=''" t)
> --8<---------------cut here---------------end--------------->8---
>
>>> Best regards,
>>> Peter
>
> Best regards, Michael.
>



reply via email to

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