GNU bug report logs - #5255
23.1.90; Wrong prompt in term

Previous Next

Package: emacs;

Reported by: Fabian Ezequiel Gallina <galli.87 <at> gmail.com>

Date: Sun, 13 Dec 2009 00:05:04 UTC

Severity: normal

Merged with 5334

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Dan Nicolaescu <dann <at> ics.uci.edu>
To: Fabian Ezequiel Gallina <galli.87 <at> gmail.com>
Cc: 5255 <at> debbugs.gnu.org
Subject: bug#5255: 23.1.90; Wrong prompt in term
Date: Tue, 22 Dec 2009 07:44:50 -0800 (PST)
Fabian Ezequiel Gallina <galli.87 <at> gmail.com> writes:

  > 2009/12/22 Dan Nicolaescu <dann <at> ics.uci.edu>:
  > >  >
  > >  > I guess I found the problem:
  > >  >
  > >  > [fgallina <at> cuca lisp]$ env | grep PROMPT_COMMAND
  > >  > PROMPT_COMMAND=echo -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.
  > >
  > 
  > Yes, it is used just for that, I found this which explains the thing:
  > http://www.faqs.org/docs/Linux-mini/Xterm-Title.html#ss3.1

The explanation is not very clear, it actually shows how this can be
done by using just PS1 and not PROMPT_COMMAND...
And it's shown that is should only happen when TERM is 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"
  > >
  > 
  > I didn't set up it myself, I guess xterm sets this automatically.

xterm does not do things like that.
Your system does it then, and it's wrong, it should only do it if TERM
is xterm.

  > 
  > >  > 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.
  > >
  > 
  > Oh yes, actually that is not being taken into account and I guess it
  > should, at least that's what happens in emacs 23.1.

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.


This bug report was last modified 15 years and 134 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.