From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.bugs Subject: bug#5255: 23.1.90; Wrong prompt in term Date: Tue, 22 Dec 2009 07:13:16 -0800 (PST) Message-ID: <200912221513.nBMFDG8E025776@godzilla.ics.uci.edu> References: <9de1a5ef0912201844r45f00f26s82560a57251524d0@mail.gmail.com> <200912221438.nBMEc4YS025361@godzilla.ics.uci.edu> <9de1a5ef0912220652s2e5d1982x20a49f4c5928f044@mail.gmail.com> Reply-To: Dan Nicolaescu , 5255@debbugs.gnu.org NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1261496441 23666 80.91.229.12 (22 Dec 2009 15:40:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 22 Dec 2009 15:40:41 +0000 (UTC) Cc: 5255@debbugs.gnu.org To: Fabian Ezequiel Gallina Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Dec 22 16:40:33 2009 Return-path: Envelope-to: geb-bug-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 1NN6qa-0004mJ-Vg for geb-bug-gnu-emacs@m.gmane.org; Tue, 22 Dec 2009 16:40:29 +0100 Original-Received: from localhost ([127.0.0.1]:57886 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NN6qb-0001CG-1O for geb-bug-gnu-emacs@m.gmane.org; Tue, 22 Dec 2009 10:40:29 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NN6qV-000190-Hc for bug-gnu-emacs@gnu.org; Tue, 22 Dec 2009 10:40:23 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NN6qQ-00012i-G2 for bug-gnu-emacs@gnu.org; Tue, 22 Dec 2009 10:40:22 -0500 Original-Received: from [199.232.76.173] (port=44443 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NN6qQ-00012a-8g for bug-gnu-emacs@gnu.org; Tue, 22 Dec 2009 10:40:18 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42890) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NN6qQ-0005SA-2H for bug-gnu-emacs@gnu.org; Tue, 22 Dec 2009 10:40:18 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1NN6R0-0002Bf-DM; Tue, 22 Dec 2009 10:14:02 -0500 X-Loop: bug-gnu-emacs@gnu.org Mail-Followup-To: Dan Nicolaescu , 5255@debbugs.gnu.org Resent-From: Dan Nicolaescu Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 22 Dec 2009 15:14:02 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: followup 5255 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 5255-submit@debbugs.gnu.org id=B5255.12614948208388 (code B ref 5255); Tue, 22 Dec 2009 15:14:02 +0000 Original-Received: (at 5255) by debbugs.gnu.org; 22 Dec 2009 15:13:40 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NN6Qe-0002BF-Ab for submit@debbugs.gnu.org; Tue, 22 Dec 2009 10:13:40 -0500 Original-Received: from colin-baker-v0.ics.uci.edu ([128.195.1.153]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NN6QR-0002Az-L6 for 5255@debbugs.gnu.org; Tue, 22 Dec 2009 10:13:39 -0500 Original-Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101]) by colin-baker-v0.ics.uci.edu (8.13.8/8.13.8) with ESMTP id nBMFDGiK001880 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 22 Dec 2009 07:13:16 -0800 Original-Received: (from dann@localhost) by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id nBMFDG8E025776; Tue, 22 Dec 2009 07:13:16 -0800 (PST) In-Reply-To: <9de1a5ef0912220652s2e5d1982x20a49f4c5928f044@mail.gmail.com> (Fabian Ezequiel Gallina's message of "Tue, 22 Dec 2009 11:52:14 -0300") Original-Lines: 51 X-ICS-MailScanner-Information: Please send mail to helpdesk@ics.uci.edu or more information X-ICS-MailScanner-ID: nBMFDGiK001880 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@godzilla.ics.uci.edu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 22 Dec 2009 10:14:02 -0500 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:33723 Archived-At: Fabian Ezequiel Gallina writes: > 2009/12/22 Dan Nicolaescu : > > Fabian Ezequiel Gallina writes: > > > > =C2=A0> In emacs 23.1 when I use M-x term the prompt is rendered corr= ectly to > > =C2=A0> whatever is defined on the PS1 environment variable. But in 2= 3.1.90.1 it > > =C2=A0> prompts whatever is defined in the PS1 but also before that, = it prompts > > =C2=A0> 0;@:. > > =C2=A0> > > =C2=A0> The steps to reproduce it are quite simple: > > =C2=A0> > > =C2=A0> emacs -Q > > =C2=A0> M-x term > > =C2=A0> > > =C2=A0> The prompt is rendered like this: > > =C2=A0> > > =C2=A0> 0;fgallina@cuca:~/Builds/emacs[fgallina@cuca emacs]$ > > =C2=A0> > > =C2=A0> Since my PS1 is set to > > =C2=A0> > > =C2=A0> PS1=3D'[\u@\h \W]\$ ' > > =C2=A0> > > =C2=A0> the expected result is: > > =C2=A0> > > =C2=A0> [fgallina@cuca emacs]$ > > > > I can't reproduce this. > > Are you sure that your prompt is set to what you show there? =C2=A0Ma= ybe the > > system default sets it to something else? > > >=20 > I guess I found the problem: >=20 > [fgallina@cuca lisp]$ env | grep PROMPT_COMMAND > PROMPT_COMMAND=3Decho -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~= }\007" That looks like a bad idea. I am guessing that you are trying to set the xterm title to display the current directory in the shell, this uses an xterm specific escape sequence. So it should only be done for xterm. But you should not need to use PROMPT_COMMAND to do this, it can be done by just setting the prompt, search the web for something like: "bash prompt xterm title" > Now the thing is that executing this in a normal terminal renders > nothing, as opposed to term. My guess would be that term is missing > the \033] escape sequence. It's actually \033];STUFF\007.