Stéphane Senesi <stephane.sen...@meteo.fr> writes:

> Dear Michael

Hi Stéphane,

> However,
>
>     - at startup, even after a "(require 'tramp)", I have :
>
>           Symbol's value as variable is void: tramp-actions-before-shell
>
>      and I must first contact an host using tramp to have it
> defined. How could I ease that?

tramp-actions-before-shell is declared in tramp-sh.el (which is
autoloaded when needed). So you might try

(require 'tramp-sh)

Which loads also tramp.el.

>     - Emacs-Lisp complains about the 'let' clause

Oops, untested code. Try this one:

(defun my-tramp-action (proc vec)
   "Enter the ssh ID depending on the host."
   (save-window-excursion
     (let ((host (tramp-file-name-host vec)))
       (with-current-buffer (tramp-get-connection-buffer vec)
         (tramp-message vec 6 "\n%s" (buffer-string))
         (cond
           ((string-equal host "rjvg003-gaya")
            (tramp-send-string vec "0"))
           ((string-equal ... )))))))

> Regards
>
> S

Best regards, Michael.

_______________________________________________
Tramp-devel mailing list
Tramp-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/tramp-devel

Reply via email to