From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.help Subject: Re: Tramp handling of customized prompts Date: Thu, 07 Jun 2007 23:08:31 +0200 Message-ID: <87ir9zpj5c.fsf@gmx.de> References: <1181050091.976357.240580@q75g2000hsh.googlegroups.com> <1181059707.081933.315290@h2g2000hsg.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1181250533 11841 80.91.229.12 (7 Jun 2007 21:08:53 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 7 Jun 2007 21:08:53 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: "stewartbryson\@gmail.com" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jun 07 23:08:52 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HwPDv-00054z-Lj for geh-help-gnu-emacs@m.gmane.org; Thu, 07 Jun 2007 23:08:51 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HwPDv-0004S7-0t for geh-help-gnu-emacs@m.gmane.org; Thu, 07 Jun 2007 17:08:51 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HwPDh-0004S1-O4 for help-gnu-emacs@gnu.org; Thu, 07 Jun 2007 17:08:37 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HwPDf-0004Rg-AW for help-gnu-emacs@gnu.org; Thu, 07 Jun 2007 17:08:36 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HwPDf-0004Rd-65 for help-gnu-emacs@gnu.org; Thu, 07 Jun 2007 17:08:35 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1HwPDe-0005b0-Ip for help-gnu-emacs@gnu.org; Thu, 07 Jun 2007 17:08:34 -0400 Original-Received: (qmail invoked by alias); 07 Jun 2007 21:08:33 -0000 Original-Received: from p57A2119E.dip0.t-ipconnect.de (EHLO localhost.local) [87.162.17.158] by mail.gmx.net (mp047) with SMTP; 07 Jun 2007 23:08:33 +0200 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX1/4hJompIb4MFgjcb/yWSlO2HGxSp3vrOlCZT+7nq bcrZeFe9xeFke+ In-Reply-To: <1181059707.081933.315290@h2g2000hsg.googlegroups.com> (stewartbryson@gmail.com's message of "Tue, 05 Jun 2007 09:08:27 -0700") User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:44764 Archived-At: "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.