help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Tramp handling of customized prompts


From: Michael Albinus
Subject: Re: Tramp handling of customized prompts
Date: Thu, 07 Jun 2007 23:08:31 +0200
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.50 (gnu/linux)

"stewartbryson@gmail.com" <stewartbryson@gmail.com> writes:

> Any other advice with this in mind?

Which Tramp version do you use? Tramp 2.0 is fussy indeed for being in
the right buffer. Tramp 2.1 shall be more docile. I would try the
following code (untested):

(defvar my-tramp-prompt-regexp
  (concat (regexp-opt '("Please enter a digit:") t) "\\s-*")
  "Regular expression matching my database chooser prompt.")

(defun my-tramp-action (proc vec)
  "Enter \"0\" in order to choose a correct database."
  (save-window-excursion
    (with-current-buffer (tramp-get-connection-buffer vec)
      (tramp-message vec 6 "\n%s" (buffer-string))
      (tramp-send-string vec "0"))))

(add-to-list 'tramp-actions-before-shell
  '((my-tramp-prompt-regexp my-tramp-action)))

> Thanks very much.
>
> Stewart

Best regards, Michael.





reply via email to

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