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: Michael Albinus
Subject: Re: tramp 2.26 emacs 24.3 plink
Date: Fri, 12 Sep 2014 11:06:00 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

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)))



reply via email to

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