From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: Q on using shell mode remotely Date: Mon, 31 Jul 2006 11:05:24 -0700 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1154369178 23278 80.91.229.2 (31 Jul 2006 18:06:18 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 31 Jul 2006 18:06:18 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jul 31 20:06:12 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1G7c9I-0004lS-I9 for geh-help-gnu-emacs@m.gmane.org; Mon, 31 Jul 2006 20:05:54 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G7c9H-0003KQ-Fh for geh-help-gnu-emacs@m.gmane.org; Mon, 31 Jul 2006 14:05:51 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1G7c96-0003Ip-U6 for help-gnu-emacs@gnu.org; Mon, 31 Jul 2006 14:05:40 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1G7c95-0003Id-7w for help-gnu-emacs@gnu.org; Mon, 31 Jul 2006 14:05:40 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G7c95-0003IZ-4U for help-gnu-emacs@gnu.org; Mon, 31 Jul 2006 14:05:39 -0400 Original-Received: from [148.87.113.118] (helo=rgminet01.oracle.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.52) id 1G7cBn-0002IW-6M for help-gnu-emacs@gnu.org; Mon, 31 Jul 2006 14:08:27 -0400 Original-Received: from rcsmt251.oracle.com (rcsmt251.oracle.com [148.87.90.196]) by rgminet01.oracle.com (Switch-3.1.6/Switch-3.1.6) with ESMTP id k6VBBmZx028454 for ; Mon, 31 Jul 2006 12:05:36 -0600 Original-Received: from dradams-lap.us.oracle.com by rcsmt251.oracle.com with ESMTP id 1676657681154369125; Mon, 31 Jul 2006 12:05:25 -0600 Original-To: X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) Importance: Normal In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1807 X-Whitelist: TRUE 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:36392 Archived-At: Drew Adams wrote: > When I use M-x telnet, I get a prompt that looks like this: > > > 8:34am ... > Any ideas on how to deal with this? Either 1) how to > recognize the presence of the added time (appearing at the left) > and treat it as part of the prompt, or 2) (not as good, because > it won't help others who use my code) how to tell telnet not to > use the time part of the prompt? Is there some > variable similar to `comint-prompt-regexp' that will pick up > $rprompt (or the concatenation of $prompt and $rprompt)? Why can't you just add a time pattern to telnet-prompt-pattern, which is used to set the buffer-local value of comint-prompt-pattern: (eval-after-load "telnet" '(setq telnet-prompt-pattern (concat telnet-prompt-pattern "\\([12]?[0-9]:[0-5][0-9][ap]m\\)?"))) Thanks again. I didn't know about `telnet-prompt-pattern'. I used `C-h m' and searched for "prompt", but the only occurences there are `comint-next-prompt' and `comint-previous-prompt'. I found nothing in the manual either. (I should have just used completion or apropos to look for a "telnet-" prompt variable.) I'll use `telnet-prompt-pattern', myself, to hack this problem, but it would be good if there were a variable that dealt with $rprompt somehow.