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: Help with Emacs 22.2.1 using TRAMP and PuTTY/plink Date: Sun, 04 May 2008 23:40:06 +0200 Message-ID: <87bq3l92a1.fsf@gmx.de> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1209937293 18673 80.91.229.12 (4 May 2008 21:41:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 4 May 2008 21:41:33 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: lyallp Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun May 04 23:42:09 2008 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 1JslyB-0006LW-UJ for geh-help-gnu-emacs@m.gmane.org; Sun, 04 May 2008 23:42:08 +0200 Original-Received: from localhost ([127.0.0.1]:43847 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JslxU-00049Q-9C for geh-help-gnu-emacs@m.gmane.org; Sun, 04 May 2008 17:41:24 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JslwL-00036p-J5 for help-gnu-emacs@gnu.org; Sun, 04 May 2008 17:40:13 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JslwI-00033h-Mr for help-gnu-emacs@gnu.org; Sun, 04 May 2008 17:40:11 -0400 Original-Received: from [199.232.76.173] (port=40671 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JslwH-00033V-VZ for help-gnu-emacs@gnu.org; Sun, 04 May 2008 17:40:10 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1JslwH-0002gV-C4 for help-gnu-emacs@gnu.org; Sun, 04 May 2008 17:40:09 -0400 Original-Received: (qmail invoked by alias); 04 May 2008 21:40:07 -0000 Original-Received: from p57A22830.dip0.t-ipconnect.de (EHLO arthur.local) [87.162.40.48] by mail.gmx.net (mp049) with SMTP; 04 May 2008 23:40:07 +0200 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX19p9ahiwoNpYeDNtZEP/LYpIer662pArJm2oENMiE 0+yw5tTelmEWnV In-Reply-To: (lyallp's message of "Sun, 4 May 2008 04:57:00 -0700 (PDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-Y-GMX-Trusted: 0 X-detected-kernel: by monty-python.gnu.org: 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:53760 Archived-At: lyallp writes: > Thanks for replying Michael. Hi Lyall. > I don't consider myself a noob at bash, but my problem is that I do > not know how to determine what the terminal is. > I can determine if it's an interactive login, but that does not help > me when it comes to TRAMP. > How do I differentiate me, from TRAMP? The default test is [ $TERM = "dumb" ] > Another part of my problem is that the server in question, on which I > am not an admin, sets TERM=vt100 in /etc/profile, unconditionally. That might be a problem, indeed. But first let's test whether setting a simple prompt helps you. > My PS1 string contains an escape sequence which updates my XTERM > window title with my "Host - User - pwd". > > I looked in TRAMP and it's simply looking for a regexp (contained in > tramp-shell-prompt-pattern), which includes, amongst other junk, a > newline followed by $ space. (which my PS1 does have - I have my > username/host/pwd followed by a newline, then $ space - rather than > having the $ space at the end of a potentially long prompt string). > > Even if it did think my prompt was earlier in the string, it does not > matter, so long as it proceeds, as almost the first thing TRAMP does > is start up /bin/sh with a prompt defined by itself as "$ " Not really. Tramp, for example, sends "unset HISTORY", and it sees your prompt with the escape sequence. So please, as a first test, discard any special prompt setting on the remote side, and see whether Tramp goes through. If this test succeeds, we can investigate how you could tetermine the presence of Tramp, if the test for $TERM is not applicable. If not, then we must continue with the EOL issue. > ...Lyall Best regards, Michael.