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: Wed, 10 Sep 2014 19:32:30 +0100

On 10 September 2014 19:22, Michael Albinus <address@hidden> wrote:
>
> MM <address@hidden> writes:
>
> >     I get this error:
> >     Symbol's value as variable is void: tramp-actions-before-shell
> >
> >
> >     Reminder: I have emacs 24.3.1 (i386-mingw) 2013-03-17, with tramp
> >     builin (so whatever version is that).
> >
> > I now have both
> > (require 'tramp)
> > (require 'tramp-sh)
>
> Yes, that's necessary. `tramp-actions-before-shell' is declared in
> tramp-sh.el. I forgot to tell you, sorry.
>
> > The previous error is gone, but now the errror is:
> >
> > Invalid function: (my-tramp-prompt-regexp my-tramp-action)
>
> Could you please show exactly what's in your .emacs? Everything what's
> Tramp related.


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



reply via email to

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