Subject: bug#5255 closed by Glenn Morris <[email-masked]> (Re: Bug#5255)

From: [email-masked] (Emacs bug Tracking System)
Date: Wed, 13 Jan 2010 00:51:02 +0000

This is an automatic notification regarding your bug report
which was filed against the emacs package:

#5255: 23.1.90; Wrong prompt in term

It has been closed by Glenn Morris <[email-masked]>.

Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact Glenn Morris <[email-masked]> by
replying to this email.

-- 
5255: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=5255
Emacs Bug Tracking System
Contact [email-masked] with problems

Subject: Re: Bug#5255
From: Glenn Morris <[email-masked]>
To: [email-masked]
Date: Tue, 12 Jan 2010 19:50:02 -0500
List-Id: <debbugs-submit.debbugs.gnu.org>

This bug was closed recently, but unfortunately the close message was
lost from the Emacs bug database. I am therefore resending the close
message. Sorry for the duplicate mail. The original close message was

http://lists.gnu.org/archive/html/bug-gnu-emacs/2009-12/msg00689.html

    From: Dan Nicolaescu <[email-masked]>
    Subject: Re: bug#5255: 23.1.90; Wrong prompt in term
    To: Fabian Ezequiel Gallina <[email-masked]>
    Cc: [email-masked]
    Date: Mon, 28 Dec 2009 11:28:21 -0800 (PST)
    
    Fabian Ezequiel Gallina <[email-masked]> writes:
    
      > 2009/12/22 Dan Nicolaescu <[email-masked]>:
      > >
      > > This is an xterm specific escape sequence, most likely due to a bad
      > > setup, you'll get the same problem if you use a vt100 terminal for
      > > example.
      > > So this is not a term.el problem.
      > >
      > 
      > Thanks for the explanation, I just added this to my .bashrc and
      > everything started to work fine again:
    
    I am closing this bug, it's not a bug in term.el
    
      > if [[ $TERM =~ ^xterm ]];
      > then
      > 	TERM=xterm-256color
    
    Changing the value of TERM is a bad idea, unless you know exactly what
    you are doing.
    
      > 	PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"'
    
    Using PROMPT_COMMAND is not a good idea, the same thing can be done with
    just setting the prompt.
    ----------

>From MAILER-DAEMON Mon Dec 21 01:02:04 2009
Mail-Followup-To: Fabian Ezequiel Gallina <[email-masked]>,
	[email-masked]
Resent-From: Fabian Ezequiel Gallina <[email-masked]>
Original-Sender: [email-masked]
Resent-To: [email-masked]
Resent-CC: [email-masked]
Resent-Date: Mon, 21 Dec 2009 03:24:02 +0000
Resent-Message-ID: <[email-masked]>
Resent-Sender: [email-masked]
Date: Sun, 20 Dec 2009 23:44:21 -0300
From: Fabian Ezequiel Gallina <[email-masked]>
To: [email-masked]
Sender: [email-masked]
Resent-Date: Sun, 20 Dec 2009 22:24:02 -0500
Cc: 
Subject: bug#5255: 23.1.90; Wrong prompt in term
Reply-To: Fabian Ezequiel Gallina <[email-masked]>, [email-masked]

In emacs 23.1 when I use M-x term the prompt is rendered correctly to
whatever is defined on the PS1 environment variable. But in 23.1.90.1 it
prompts whatever is defined in the PS1 but also before that, it prompts
0;<user>@<host>:<location>.

The steps to reproduce it are quite simple:

emacs -Q
M-x term

The prompt is rendered like this:

0;fgallina@cuca:~/Builds/emacs[fgallina@cuca emacs]$

Since my PS1 is set to

PS1='[\u@\h \W]\$ '

the expected result is:

[fgallina@cuca emacs]$

In GNU Emacs 23.1.90.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.18.5)
 of 2009-12-20 on cuca
Windowing system distributor `The X.Org Foundation', version 11.0.10703901
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: es_AR.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Fundamental

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  blink-cursor-mode: t
  global-auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> M-x t e r m <return>
<return> l s <return> M-c <backspace> M-x <backspace>
C-c b <return> M-x r e m p o <backspace> <backspace>
<backspace> p o <tab> r <tab> <return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Making completion list...

Load-path shadows:
None found.

Features:
(shadow sort mail-extr message sendmail regexp-opt ecomplete rfc822 mml
mml-sec password-cache mm-decode mm-bodies mm-encode mailcap mail-parse
rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util
netrc time-date mm-util mail-prsvr gmm-utils wid-edit mailheader canlock
sha1 hex-util hashcash mail-utils emacsbug help-mode easymenu view term
disp-table ehelp electric ring tooltip ediff-hook vc-hooks
lisp-float-type mwheel x-win x-dnd font-setting tool-bar dnd fontset
image fringe lisp-mode register page menu-bar rfn-eshadow timer select
scroll-bar mldrag mouse jit-lock font-lock syntax facemenu font-core
frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai
tai-viet lao korean japanese hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help
simple abbrev loaddefs button minibuffer faces cus-face files
text-properties overlay md5 base64 format env code-pages mule custom
widget hashtable-print-readable backquote make-network-process dbusbind
system-font-setting font-render-setting gtk x-toolkit x multi-tty emacs)