Dear all, and Michael

I tried the method described in the doc under "remote shell setup hints", namely :
           (defconst my-tramp-prompt-regexp
             (concat (regexp-opt '("Enter the birth date of your mother:") t)
                     "\\s-*")
             "Regular expression matching my login prompt question.")

           (defun my-tramp-action (proc vec)
             "Enter \"19000101\" 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 "19000101"))))

           (add-to-list 'tramp-actions-before-shell
                        '(my-tramp-prompt-regexp my-tramp-action))
with only few changes.

From what appears in my tramp debug buffer (with verbosity level 6), it looks like there is no "end-of-line" character sent by tramp-send-string. I tried to add one in the argument to tramp-send-string, namely writing :
    (tramp-send-string vec "abcd\n" )
or even,
    (tramp-send-string vec "abcd\nefgh\n" )
In that last case, the tramp-buffer will show :
    abcdefgh

I guess that I misunderstand how to embed an end-of-line in an Emacs-lisp string; but I expected (from the discussion at http://lists.gnu.org/archive/html/tramp-devel/2013-02/msg00009.html) that it was not necessary to provide an end-of-line to tramp-send-string

Any hint ?
Note : In my context, tramp-rsh-end-of-line's value is "\n", Emacs version is 23.3.1, Tramp version is 2.1.20


Best regards

--
Stéphane Sénési
7 Allée Victor Capoul
F-31770 Colomiers
+33.6.81.25.94.15


_______________________________________________
Tramp-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/tramp-devel

Reply via email to