tramp-devel
[Top][All Lists]
Advanced

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

Re: tramp 2.26 emacs 24.3 plink


From: MM
Subject: Re: tramp 2.26 emacs 24.3 plink
Date: Fri, 12 Sep 2014 10:38:43 +0100

On 12 September 2014 10:37, MM <address@hidden> wrote:
> On 12 September 2014 10:06, Michael Albinus <address@hidden> wrote:
>> MM <address@hidden> writes:
>>
>>> A copy paste from the .emacs buffer, in case a missing char somewhere:
>>> (this email is in Plain text mode)
>>>
>>> (require 'tramp)
>>> (require 'tramp-sh)
>>> (defconst my-tramp-prompt-regexp
>>>   (concat (regexp-quote "Host:") "\\s-*")
>>>   "Regular expression matching my login prompt question.")
>>>
>>> (defun my-tramp-action (proc vec)
>>>   "Enter the host name in order to give a correct answer."
>>>   (save-window-excursion
>>>     (with-current-buffer (tramp-get-connection-buffer vec)
>>>       (tramp-message vec 6 "\n%s" (buffer-string))
>>>       (tramp-send-string vec "hostname"))))
>>>
>>> (eval-after-load "tramp-sh"
>>>  (add-to-list 'tramp-actions-before-shell
>>>               '(my-tramp-prompt-regexp my-tramp-action)))
>>
>> Try this one:
>>
>> (eval-after-load "tramp-sh"
>>   '(add-to-list 'tramp-actions-before-shell
>>                 '(my-tramp-prompt-regexp my-tramp-action)))
>
> Yes that fixes it.
> I have just tried:
> "C-x C-f /plink:address@hidden|address@hidden:/path/to/file"
>
> It asks me for password for "host", not for "gateway", which I type,
> then Enter, then it shows:
> "Opening FTP connection to host...." and launches a windows ftp.exe
> subprocess -i -n -g -v
I forgot to say, it just hangs then


>
> Note the following is commented out at the moment:
>
> ;;(add-to-list 'tramp-methods
> ;;  '("myplink"
> ;;    (tramp-login-program        "plink")
> ;;    (tramp-login-args              (("-l" "%u") ("-pw" "mypasswd")
> ("-ssh") ("%h")))
> ;;    (tramp-remote-shell         "/bin/bash")
> ;;    (tramp-remote-shell-args    ("-c"))
> ;;   ))
>
> ;;(setq tramp-default-method "myplink")
> ;; (setq tramp-password-end-of-line "\r\n")
> ;;(add-to-list 'tramp-default-proxies-alist
> ;;  '("host" nil "/myplink:address@hidden:"))
>
> because I don't know how to combine it with the bits of:
> eval-after-load "tramp-sh"
>
> MM



reply via email to

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