From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Tramp over su, with odd zsh prompt Date: Mon, 29 May 2006 19:15:27 -0400 Message-ID: References: <877j44tx2u.fsf@gmx.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1148944557 18593 80.91.229.2 (29 May 2006 23:15:57 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 29 May 2006 23:15:57 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 30 01:15:55 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Fkqxk-0007fl-Go for ged-emacs-devel@m.gmane.org; Tue, 30 May 2006 01:15:52 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fkqxj-0000aa-UZ for ged-emacs-devel@m.gmane.org; Mon, 29 May 2006 19:15:51 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FkqxP-0000VA-E7 for emacs-devel@gnu.org; Mon, 29 May 2006 19:15:31 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FkqxM-0000TD-OC for emacs-devel@gnu.org; Mon, 29 May 2006 19:15:30 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FkqxM-0000T2-Hr for emacs-devel@gnu.org; Mon, 29 May 2006 19:15:28 -0400 Original-Received: from [209.226.175.188] (helo=tomts25-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fkr31-0000KU-Tb for emacs-devel@gnu.org; Mon, 29 May 2006 19:21:20 -0400 Original-Received: from localhost ([70.55.143.78]) by tomts25-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20060529231527.IDKX1747.tomts25-srv.bellnexxia.net@localhost>; Mon, 29 May 2006 19:15:27 -0400 Original-Received: by localhost (Postfix, from userid 20848) id 9B0DD8232; Mon, 29 May 2006 19:15:27 -0400 (EDT) Original-To: Michael Albinus In-Reply-To: <877j44tx2u.fsf@gmx.de> (Michael Albinus's message of "Mon, 29 May 2006 22:06:33 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:55461 Archived-At: >> I recently tried to use Tramp to access a file via `su' and bumped into the >> following problem: the prompt (resulting from a very plain default setting >> PS1="%m%# ") looks like >> >> %<78 SPC>^M^Malfajor% >> >> where alfajor is the machine name (an argentine pastry). >> >> So it seems that although Tramp sets TERM=dump, the `zsh' executable >> (version 4.3.2, from Debian testing) uses funny carriaqe-return trickery and >> for apparently no good reason. >> >> Has anybody seen this before? Should I just set >> tramp-shell-prompt-pattern accordingly? Have you heard of such >> behavior already (and maybe some way to get zsh to behave a bit better)? > When zsh is in interactive mode, it uses its internal zsh line editor > (zle). This provides left and right prompts; therefore the spaces. > Disabling zle for the Tramp case is sufficient. > The following lines in .zshrc work for me: > # Let Tramp come in > [ $TERM = "dumb" ] && unsetopt zle Yuck! > PS: "for apparently no good reason" depends. Play with promptinit / > prompt themes, you'll see lot of gimmicks. Still no good reasons since I don't use those extra features. But I guess it makes the code simpler. > PPS: I'll give it a short note in the Tramp manual. Could Tramp reasonably look for a prompt after ^M rather than only after ^J ? Stefan