GNU bug report logs - #11065
24.0.94; Problem with tramp & plink

Previous Next

Package: emacs;

Reported by: Dani Moncayo <dmoncayo <at> gmail.com>

Date: Thu, 22 Mar 2012 11:27:02 UTC

Severity: normal

Tags: notabug

Found in version 24.0.94

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

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 11065 in the body.
You can then email your comments to 11065 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#11065; Package emacs. (Thu, 22 Mar 2012 11:27:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dani Moncayo <dmoncayo <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 22 Mar 2012 11:27:03 GMT) Full text and rfc822 format available.

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

From: Dani Moncayo <dmoncayo <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.0.94; Problem with tramp & plink
Date: Thu, 22 Mar 2012 11:54:59 +0100
[Message part 1 (text/plain, inline)]
Hello,

I'm trying to use Emacs to edit remote file at work, but I'm having trouble.

This is my setup:
* OS: Windows XP SP3.
* GNU Emacs 24.0.94 (almost latest trunk).
* Putty 0.62 installed, with its related utilities (pscp, plink, psftp).

From a cmd.exe console, I can login to a remote host using the command
"plink my_host" and giving my credentials.  However, the remote host
returns strange characters just before the the prompt text:

  [Copyright messages and stuff...]

  You have mail.
          ←H        ←H        ←H        ←H        ←H        ←H
←H        ←H
  [/home/my_user]


Now, from emacs (-Q), if I do:
  (cd "/plink:my_user <at> my_host:~/")

Emacs ask me the password and after I provide it, hangs (I can cancel
the operation with several `C-g').

Looking at the *tramp/plink my_user <at> my_host* buffer (attached to this
email), I see that the login has been successful, but Emacs somehow is
not aware of that (probably because of the above-mentioned strange
characters).

So, I'd like to know if I can do something to make Emacs work in this
case, or Emacs can be adapted instead.

TIA.

In GNU Emacs 24.0.94.1 (i386-mingw-nt5.1.2600)
 of 2012-03-19 on MARVIN
Windowing system distributor `Microsoft Corp.', version 5.1.2600
Configured using:
 `configure --with-gcc (4.6) --no-opt --enable-checking --cflags
 -ID:/devel/emacs/libs/libXpm-3.5.8/include
 -ID:/devel/emacs/libs/libXpm-3.5.8/src
 -ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include
 -ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include
 -ID:/devel/emacs/libs/giflib-4.1.4-1/include
 -ID:/devel/emacs/libs/jpeg-6b-4/include
 -ID:/devel/emacs/libs/tiff-3.8.2-1/include
 -ID:/devel/emacs/libs/gnutls-3.0.9/include'

-- 
Dani Moncayo
[plink-buffer.txt (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11065; Package emacs. (Thu, 22 Mar 2012 17:00:01 GMT) Full text and rfc822 format available.

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

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Dani Moncayo <dmoncayo <at> gmail.com>
Cc: 11065 <at> debbugs.gnu.org
Subject: Re: bug#11065: 24.0.94; Problem with tramp & plink
Date: Thu, 22 Mar 2012 17:28:42 +0100
Dani Moncayo <dmoncayo <at> gmail.com> writes:

> Hello,

Hi Dani,

> From a cmd.exe console, I can login to a remote host using the command
> "plink my_host" and giving my credentials.  However, the remote host
> returns strange characters just before the the prompt text:
>
>   [Copyright messages and stuff...]
>
>   You have mail.
>           ←H        ←H        ←H        ←H        ←H        ←H
> ←H        ←H
>   [/home/my_user]

The default shell prompt pattern in Tramp does not recognizes "[]"
templates. You might change it by

(setq tramp-shell-prompt-pattern
      "\\(?:^\\|\\)[^#$%>\n]*#?[]#$%>] *\\(\\[[0-9;]*[a-zA-Z] *\\)*"

(Beware the ^M and ^[ characters)

> TIA.

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11065; Package emacs. (Thu, 22 Mar 2012 17:13:02 GMT) Full text and rfc822 format available.

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

From: Dani Moncayo <dmoncayo <at> gmail.com>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 11065 <at> debbugs.gnu.org
Subject: Re: bug#11065: 24.0.94; Problem with tramp & plink
Date: Thu, 22 Mar 2012 17:41:12 +0100
> The default shell prompt pattern in Tramp does not recognizes "[]"
> templates. You might change it by
>
> (setq tramp-shell-prompt-pattern
>      "\\(?:^\\|\\)[^#$%>\n]*#?[]#$%>] *\\(\\[[0-9;]*[a-zA-Z] *\\)*"
>
> (Beware the ^M and ^[ characters)

This seems to work for me.  So this bug report can be closed.

Thanks!

-- 
Dani Moncayo




Added tag(s) notabug. Request was from Michael Albinus <michael.albinus <at> gmx.de> to control <at> debbugs.gnu.org. (Thu, 22 Mar 2012 20:10:02 GMT) Full text and rfc822 format available.

Reply sent to Michael Albinus <michael.albinus <at> gmx.de>:
You have taken responsibility. (Thu, 22 Mar 2012 20:13:02 GMT) Full text and rfc822 format available.

Notification sent to Dani Moncayo <dmoncayo <at> gmail.com>:
bug acknowledged by developer. (Thu, 22 Mar 2012 20:13:02 GMT) Full text and rfc822 format available.

Message #18 received at 11065-done <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Dani Moncayo <dmoncayo <at> gmail.com>
Cc: 11065-done <at> debbugs.gnu.org
Subject: Re: bug#11065: 24.0.94; Problem with tramp & plink
Date: Thu, 22 Mar 2012 20:41:42 +0100
Dani Moncayo <dmoncayo <at> gmail.com> writes:

> This seems to work for me.  So this bug report can be closed.

Done.

> Thanks!

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11065; Package emacs. (Thu, 22 Mar 2012 22:02:01 GMT) Full text and rfc822 format available.

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

From: Lennart Borgman <lennart.borgman <at> gmail.com>
To: 11065 <at> debbugs.gnu.org, michael.albinus <at> gmx.de
Subject: Re: bug#11065: 24.0.94; Problem with tramp & plink
Date: Thu, 22 Mar 2012 22:30:17 +0100
On Thu, Mar 22, 2012 at 20:41, Michael Albinus <michael.albinus <at> gmx.de> wrote:
> Dani Moncayo <dmoncayo <at> gmail.com> writes:
>
>> This seems to work for me.  So this bug report can be closed.
>
> Done.
>
>> Thanks!
>
> Best regards, Michael.

Just a thought: Is not plink the "standard" way to communicate this
way with Emacs on w32? Should perhaps this solution be documented
somewhere? (Or even implemented as a choice on w32?)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11065; Package emacs. (Fri, 23 Mar 2012 08:20:01 GMT) Full text and rfc822 format available.

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

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Lennart Borgman <lennart.borgman <at> gmail.com>
Cc: 11065 <at> debbugs.gnu.org
Subject: Re: bug#11065: 24.0.94; Problem with tramp & plink
Date: Fri, 23 Mar 2012 08:48:39 +0100
Lennart Borgman <lennart.borgman <at> gmail.com> writes:

Hi Lennart,

> Just a thought: Is not plink the "standard" way to communicate this
> way with Emacs on w32?

The problem is not related to plink. It can happen for every Tramp
connection using a remote shell, and the remote shell's prompt is
composed by "[]".

> Should perhaps this solution be documented somewhere?

Customizing `tramp-shell-prompt-pattern' is documented in the Tramp manual.

> (Or even implemented as a choice on w32?)

`tramp-shell-prompt-pattern' is derived from `shell-prompt-pattern'.
Both do not support "[]" style prompts, because shell script fragments like

    if [ -n "$FOO" ]

would be treated as prompt. OTOH, Tramp redefines the prompt immediately
after connection, so it might be safe to add this prompt style (as I
have recommended to Dani).

I will check the Tramp sources, whether there are other potential
conflicts. If there is no obvious problem, I'll extend
`tramp-shell-prompt-pattern' in the trunk such a way, once it has been
reopened for 24.2. Let's see, whether somebody rants about.

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11065; Package emacs. (Fri, 23 Mar 2012 13:05:01 GMT) Full text and rfc822 format available.

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

From: Christoph Scholtes <cschol2112 <at> googlemail.com>
To: Dani Moncayo <dmoncayo <at> gmail.com>
Cc: 11065 <at> debbugs.gnu.org
Subject: Re: bug#11065: 24.0.94; Problem with tramp & plink
Date: Fri, 23 Mar 2012 06:33:49 -0600
On 3/22/2012 4:54 AM, Dani Moncayo wrote:
\
> I'm trying to use Emacs to edit remote file at work, but I'm having trouble.
>
> This is my setup:
> * OS: Windows XP SP3.
> * GNU Emacs 24.0.94 (almost latest trunk).
> * Putty 0.62 installed, with its related utilities (pscp, plink, psftp).

Can you send your Tramp specific settings in your .emacs?

Thanks,
Christoph




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11065; Package emacs. (Fri, 23 Mar 2012 13:08:02 GMT) Full text and rfc822 format available.

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

From: Lennart Borgman <lennart.borgman <at> gmail.com>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 11065 <at> debbugs.gnu.org
Subject: Re: bug#11065: 24.0.94; Problem with tramp & plink
Date: Fri, 23 Mar 2012 13:36:32 +0100
[Message part 1 (text/plain, inline)]
On Fri, Mar 23, 2012 at 08:48, Michael Albinus <michael.albinus <at> gmx.de>wrote:

> Lennart Borgman <lennart.borgman <at> gmail.com> writes:
>
> Hi Lennart,
>
> > Just a thought: Is not plink the "standard" way to communicate this
> > way with Emacs on w32?
>
> The problem is not related to plink. It can happen for every Tramp
> connection using a remote shell, and the remote shell's prompt is
> composed by "[]".
>

I see, thanks Michael.
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11065; Package emacs. (Fri, 23 Mar 2012 13:12:01 GMT) Full text and rfc822 format available.

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

From: Dani Moncayo <dmoncayo <at> gmail.com>
To: Christoph Scholtes <cschol2112 <at> googlemail.com>
Cc: 11065 <at> debbugs.gnu.org
Subject: Re: bug#11065: 24.0.94; Problem with tramp & plink
Date: Fri, 23 Mar 2012 13:40:37 +0100
> Can you send your Tramp specific settings in your .emacs?

When I send this bug report, my tram-specific settings where zero.

Now, I have what Michael suggested:

  (setq tramp-shell-prompt-pattern
        "\\(?:^\\|\\)[^#$%>\n]*#?[]#$%>] *\\(\\[[0-9;]*[a-zA-Z] *\\)*")


-- 
Dani Moncayo




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11065; Package emacs. (Fri, 23 Mar 2012 13:35:01 GMT) Full text and rfc822 format available.

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

From: Dani Moncayo <dmoncayo <at> gmail.com>
To: Christoph Scholtes <cschol2112 <at> googlemail.com>
Cc: 11065 <at> debbugs.gnu.org
Subject: Re: bug#11065: 24.0.94; Problem with tramp & plink
Date: Fri, 23 Mar 2012 14:03:25 +0100
> When I send this bug report, my tram-specific settings where zero.
         ^^^^                     ^^^^

Sorry, I meant:
  When I sent this bug report, my tramp-specific settings where zero.

-- 
Dani Moncayo




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 21 Apr 2012 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 13 years and 120 days ago.

Previous Next


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