* bug#11065: 24.0.94; Problem with tramp & plink
@ 2012-03-22 10:54 Dani Moncayo
2012-03-22 16:28 ` Michael Albinus
2012-03-23 12:33 ` Christoph Scholtes
0 siblings, 2 replies; 10+ messages in thread
From: Dani Moncayo @ 2012-03-22 10:54 UTC (permalink / raw)
To: 11065
[-- Attachment #1: Type: text/plain, Size: 1770 bytes --]
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@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@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
[-- Attachment #2: plink-buffer.txt --]
[-- Type: text/plain, Size: 1271 bytes --]
plink -l fac03 -ssh nuxapds1 && exit || exit
fac03@nuxapds1's password:
Last login: Thu Mar 22 11:35:51 2012 from 170.251.78.171
(c)Copyright 1983-2006 Hewlett-Packard Development Company, L.P.
(c)Copyright 1979, 1980, 1983, 1985-1993 The Regents of the Univ. of California
(c)Copyright 1980, 1984, 1986 Novell, Inc.
(c)Copyright 1986-2000 Sun Microsystems, Inc.
(c)Copyright 1985, 1986, 1988 Massachusetts Institute of Technology
(c)Copyright 1989-1993 The Open Software Foundation, Inc.
(c)Copyright 1990 Motorola, Inc.
(c)Copyright 1990, 1991, 1992 Cornell University
(c)Copyright 1989-1991 The University of Maryland
(c)Copyright 1988 Carnegie Mellon University
(c)Copyright 1991-2006 Mentat Inc.
(c)Copyright 1996 Morning Star Technologies, Inc.
(c)Copyright 1996 Progressive Systems, Inc.
Confidential computer software. Valid license from HP required for
possession, use or copying. Consistent with FAR 12.211 and 12.212,
Commercial Computer Software, Computer Software Documentation, and
Technical Data for Commercial Items are licensed to the U.S. Government
under vendor's standard commercial license.
You have mail.
\r^[[3g\r ^[H ^[H ^[H ^[H ^[H ^[H ^[H ^[H ^[H\r[/home/fac03]
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#11065: 24.0.94; Problem with tramp & plink
2012-03-22 10:54 bug#11065: 24.0.94; Problem with tramp & plink Dani Moncayo
@ 2012-03-22 16:28 ` Michael Albinus
2012-03-22 16:41 ` Dani Moncayo
2012-03-23 12:33 ` Christoph Scholtes
1 sibling, 1 reply; 10+ messages in thread
From: Michael Albinus @ 2012-03-22 16:28 UTC (permalink / raw)
To: Dani Moncayo; +Cc: 11065
Dani Moncayo <dmoncayo@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.
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#11065: 24.0.94; Problem with tramp & plink
2012-03-22 16:28 ` Michael Albinus
@ 2012-03-22 16:41 ` Dani Moncayo
2012-03-22 19:41 ` Michael Albinus
0 siblings, 1 reply; 10+ messages in thread
From: Dani Moncayo @ 2012-03-22 16:41 UTC (permalink / raw)
To: Michael Albinus; +Cc: 11065
> 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
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#11065: 24.0.94; Problem with tramp & plink
2012-03-22 16:41 ` Dani Moncayo
@ 2012-03-22 19:41 ` Michael Albinus
2012-03-22 21:30 ` Lennart Borgman
0 siblings, 1 reply; 10+ messages in thread
From: Michael Albinus @ 2012-03-22 19:41 UTC (permalink / raw)
To: Dani Moncayo; +Cc: 11065-done
Dani Moncayo <dmoncayo@gmail.com> writes:
> This seems to work for me. So this bug report can be closed.
Done.
> Thanks!
Best regards, Michael.
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#11065: 24.0.94; Problem with tramp & plink
2012-03-22 19:41 ` Michael Albinus
@ 2012-03-22 21:30 ` Lennart Borgman
2012-03-23 7:48 ` Michael Albinus
0 siblings, 1 reply; 10+ messages in thread
From: Lennart Borgman @ 2012-03-22 21:30 UTC (permalink / raw)
To: 11065, michael.albinus
On Thu, Mar 22, 2012 at 20:41, Michael Albinus <michael.albinus@gmx.de> wrote:
> Dani Moncayo <dmoncayo@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?)
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#11065: 24.0.94; Problem with tramp & plink
2012-03-22 21:30 ` Lennart Borgman
@ 2012-03-23 7:48 ` Michael Albinus
2012-03-23 12:36 ` Lennart Borgman
0 siblings, 1 reply; 10+ messages in thread
From: Michael Albinus @ 2012-03-23 7:48 UTC (permalink / raw)
To: Lennart Borgman; +Cc: 11065
Lennart Borgman <lennart.borgman@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.
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#11065: 24.0.94; Problem with tramp & plink
2012-03-22 10:54 bug#11065: 24.0.94; Problem with tramp & plink Dani Moncayo
2012-03-22 16:28 ` Michael Albinus
@ 2012-03-23 12:33 ` Christoph Scholtes
2012-03-23 12:40 ` Dani Moncayo
1 sibling, 1 reply; 10+ messages in thread
From: Christoph Scholtes @ 2012-03-23 12:33 UTC (permalink / raw)
To: Dani Moncayo; +Cc: 11065
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
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2012-03-23 13:03 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-22 10:54 bug#11065: 24.0.94; Problem with tramp & plink Dani Moncayo
2012-03-22 16:28 ` Michael Albinus
2012-03-22 16:41 ` Dani Moncayo
2012-03-22 19:41 ` Michael Albinus
2012-03-22 21:30 ` Lennart Borgman
2012-03-23 7:48 ` Michael Albinus
2012-03-23 12:36 ` Lennart Borgman
2012-03-23 12:33 ` Christoph Scholtes
2012-03-23 12:40 ` Dani Moncayo
2012-03-23 13:03 ` Dani Moncayo
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.