GNU bug report logs - #2400
23.0.90; shell-mode: garbage in prompt

Previous Next

Package: emacs;

Reported by: Xavier Maillard <xma <at> gnu.org>

Date: Fri, 20 Feb 2009 01:35:04 UTC

Severity: normal

Tags: notabug

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: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Glenn Morris <rgm <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#2400: closed (23.0.90; shell-mode: garbage in prompt)
Date: Fri, 15 Jul 2011 20:56:03 +0000
[Message part 1 (text/plain, inline)]
Your message dated Fri, 15 Jul 2011 16:55:18 -0400
with message-id <lwei1rb6x5.fsf <at> fencepost.gnu.org>
and subject line Re: bug#2400: 23.0.90; shell-mode: garbage in prompt
has caused the GNU bug report #2400,
regarding 23.0.90; shell-mode: garbage in prompt
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
2400: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=2400
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Xavier Maillard <xma <at> gnu.org>
To: emacs-pretest-bug <at> gnu.org
Subject: 23.0.90; shell-mode: garbage in prompt
Date: Fri, 20 Feb 2009 02:25:03 +0100
My prompt is rendered with garbage like this:

]0;xma <at> zogzog:~/var/spool/mail]0;xma <at> zogzog:~/var/spool/mail[xma <at> zogzog 00:36:00 mail]$ 

It happens with emacs -Q

Steps to reproduce:

M-x shell RET
M-x load-library RET ansi-color RET
M-x ansi-color-for-comint-on RET

Reproducible: always


In GNU Emacs 23.0.90.2 (i686-pc-linux-gnu, GTK+ Version 2.12.12)
 of 2009-02-14 on zogzog
Windowing system distributor `The X.Org Foundation', version 11.0.10402000
configured using `configure  '--without-xft''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: en_US.UTF-8
  value of $LC_CTYPE: fr_FR.UTF-8
  value of $LC_MESSAGES: en_US.UTF-8
  value of $LC_MONETARY: fr_FR.UTF-8
  value of $LC_NUMERIC: en_US.UTF-8
  value of $LC_TIME: en_US.UTF-8
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default-enable-multibyte-characters: t

Major mode: Shell

Minor modes in effect:
  rcirc-track-minor-mode: t
  eev-mode: t
  shell-dirtrack-mode: t
  jabber-activity-mode: t
  auto-insert-mode: t
  global-hi-lock-mode: t
  hi-lock-mode: t
  show-paren-mode: t
  global-auto-revert-mode: t
  display-time-mode: t
  recentf-mode: t
  icomplete-mode: t
  desktop-save-mode: t
  auto-image-file-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  transient-mark-mode: t
  abbrev-mode: t

Recent input:
u p o n , SPC F R E E <return> d SPC SPC d SPC SPC 
SPC d d d d d d d C-x 1 d d d d d d d d d d d d d d 
d d d C-l d d d M-< h C-x 1 l f a i r y d a y s y <backspace> 
<backspace> <backspace> <backspace> <backspace> <backspace> 
i d a y s y <return> h C-M-t <up> <right> <right> <right> 
<right> <right> <backspace> y <return> h l f a i r 
y d a <tab> <backspace> y s y <return> h C-x 1 C-l 
C-l C-l C-M-t f a i r [ y ] <backspace> i ] <return> 
h M-> C-x 1 C-l <up> C-l C-l C-l C-M-t O S S-SPC X 
<return> d d d d d d d d d d d d d d d d d d d d d 
d d d C-l d d d d d d d d d d d d d M-< h C-x 1 C-l 
C-l 1 4 8 8 j C-l C-l M-x a n s i - t e r <tab> <return> 
<return> <return> <return> <up> <down> <up> <return> 
M-k C-h v s h e l l - m o d e <tab> h o <tab> <return> 
M-k M-x s h e l l <return> <return> e x p o r t SPC 
T E R M = v t 1 0 0 <return> l s <return> l s SPC - 
- c o l o r = y e s <return> <up> <down> M-p SPC - 
l a r t SPC / t m p / <return> C-a C-a C-SPC <up> M-w 
M-x r e p o r t - e m <tab> <return>

Recent messages:
Computing summary lines...done
No previous message
Computing summary lines...done
Mark set
Computing summary lines...done
Mark set
Computing summary lines...done
Type "q" to restore this window.
History item: 1
Mark set


	Xavier
-- 
http://www.gnu.org
http://www.april.org
http://www.lolica.org


[Message part 3 (message/rfc822, inline)]
From: Glenn Morris <rgm <at> gnu.org>
To: 2400-done <at> debbugs.gnu.org
Subject: Re: bug#2400: 23.0.90; shell-mode: garbage in prompt
Date: Fri, 15 Jul 2011 16:55:18 -0400
tags 2400 notabug
stop

Xavier Maillard wrote:

> Here is the definition of my PS1 variable:
>
> \[\033]0;\u@\h: \w\007\]\[\033[0m\033[0;1m\][\[\033[0m\033[0;32m\]\u@\h \[\033[0m\033[1;34m\]\t \[\033[0m\033[0;36m\]\W\[\033[0m\033[0;1m\]]\[\033[0m\033[0;37m\]\$

This does more than just set your prompt and colour it.
It also sets the xterm title to "user <at> host: pwd".

man console_codes:

   ESC ] 2 ; txt ST        Set window title to txt

This is not an ANSI colour escape sequence and so is not handled by
ansi-color. It's not appropriate to use such a PS1 setting on something
that is not an xterm. For example, it also messes up on the Linux
console.


This bug report was last modified 14 years and 10 days ago.

Previous Next


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