From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "stewartbryson@gmail.com" Newsgroups: gmane.emacs.help Subject: Re: Tramp handling of customized prompts Date: Tue, 12 Jun 2007 20:22:46 -0000 Organization: http://groups.google.com Message-ID: <1181679766.630031.27170@q19g2000prn.googlegroups.com> References: <1181050091.976357.240580@q75g2000hsh.googlegroups.com> <1181059707.081933.315290@h2g2000hsg.googlegroups.com> <1181665175.226046.171570@g37g2000prf.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: sea.gmane.org 1181680939 6176 80.91.229.12 (12 Jun 2007 20:42:19 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 12 Jun 2007 20:42:19 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jun 12 22:42:18 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 1HyDBt-0007gn-Sr for geh-help-gnu-emacs@m.gmane.org; Tue, 12 Jun 2007 22:42:14 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HyDBt-00077L-FH for geh-help-gnu-emacs@m.gmane.org; Tue, 12 Jun 2007 16:42:13 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!q19g2000prn.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 50 Original-NNTP-Posting-Host: 12.44.84.194 Original-X-Trace: posting.google.com 1181679767 7030 127.0.0.1 (12 Jun 2007 20:22:47 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Tue, 12 Jun 2007 20:22:47 +0000 (UTC) In-Reply-To: User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30),gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: q19g2000prn.googlegroups.com; posting-host=12.44.84.194; posting-account=9_8k5w0AAACEdxlKdc1yk4pE1k7wpL_l Original-Xref: shelby.stanford.edu gnu.emacs.help:149387 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:44976 Archived-At: On Jun 12, 3:55 pm, Michael Albinus wrote: > "stewartbry...@gmail.com" writes: > > I upgraded to tramp 2.1.9, and invoked the following code: > > > (require 'tramp) > > > (defvar tramp-db-num-prompt-regexp (concat (regexp-opt '("Please enter > > your choice:") t) "\\s-*") > > "Custom regexp for interacting with the database numberpromptat DS > > Waters.") > > > (defun tramp-action-db-num-prompt(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 > > '((tramp-db-num-prompt-regexp tramp-action-db-num-prompt))) > > Cut'n'waste error in my example. You would need > > (add-to-list 'tramp-actions-before-shell > '(tramp-db-num-prompt-regexp tramp-action-db-num-prompt)) > This worked! Thanks very much. > Also, you might consider to use own symbol names _not_ starting with > "tramp-". It is common practice to apply such prefixes only to all > symbols of a package. This is useful for later debugging. > I took your suggestion with this as well. Any recommendations on how to signify that these custom functions are specific for using with Tramp, or am I looking for overkill here? > > Thanks Michael. > > > swb > > Best regards, Michael.- Hide quoted text - > > - Show quoted text - Thanks again Michael.