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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 2400 in the body.
You can then email your comments to 2400 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#2400; Package emacs. (Fri, 20 Feb 2009 01:35:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Xavier Maillard <xma <at> gnu.org>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Fri, 20 Feb 2009 01:35:04 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

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




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#2400; Package emacs. (Fri, 20 Feb 2009 02:05:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Chong Yidong <cyd <at> stupidchicken.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Fri, 20 Feb 2009 02:05:05 GMT) Full text and rfc822 format available.

Message #10 received at 2400 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Xavier Maillard <xma <at> gnu.org>
Cc: 2400 <at> debbugs.gnu.org
Subject: RE: 23.0.90; shell-mode: garbage in prompt
Date: Thu, 19 Feb 2009 21:00:26 -0500
> My prompt is rendered with garbage like this:
> ...
> 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

I can't reproduce this.  What is the $PS1 setting for your prompt?  And
does this bug occur in Emacs 22?




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#2400; Package emacs. (Fri, 20 Feb 2009 03:50:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Fri, 20 Feb 2009 03:50:03 GMT) Full text and rfc822 format available.

Message #15 received at 2400 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Xavier Maillard <xma <at> gnu.org>
Cc: 2400 <at> debbugs.gnu.org
Subject: Re: bug#2400: 23.0.90; shell-mode: garbage in prompt
Date: Thu, 19 Feb 2009 22:43:40 -0500
> 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]$ 

These don't look like color escape sequences.  So the problem is most
likely in your prompt.


        Stefan





Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#2400; Package emacs. (Fri, 20 Feb 2009 20:35:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Xavier Maillard <xma <at> gnu.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Fri, 20 Feb 2009 20:35:04 GMT) Full text and rfc822 format available.

Message #20 received at 2400 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Xavier Maillard <xma <at> gnu.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 2400 <at> debbugs.gnu.org
Subject: Re: bug#2400: 23.0.90; shell-mode: garbage in prompt
Date: Fri, 20 Feb 2009 10:25:02 +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]$ 

   These don't look like color escape sequences.  So the problem is most
   likely in your prompt.

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\]\$

The weird thing is the line above the prompt. My prompt is no
more than [xma <at> zogzog 00:36:00 mail] here.

Regards,

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




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#2400; Package emacs. (Fri, 20 Feb 2009 20:35:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Xavier Maillard <xma <at> gnu.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Fri, 20 Feb 2009 20:35:05 GMT) Full text and rfc822 format available.

Message #25 received at 2400 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Xavier Maillard <xma <at> gnu.org>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: 2400 <at> debbugs.gnu.org
Subject: Re: 23.0.90; shell-mode: garbage in prompt
Date: Fri, 20 Feb 2009 10:25:04 +0100
   > My prompt is rendered with garbage like this:
   > ...
   > 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

   I can't reproduce this.  What is the $PS1 setting for your prompt?  And
   does this bug occur in Emacs 22?

It occurs both on Emacs 22 and Emacs 23.

As for the PS1 value, see my other post.

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




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#2400; Package emacs. (Fri, 20 Feb 2009 21:20:07 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> IRO.UMontreal.CA>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Fri, 20 Feb 2009 21:20:07 GMT) Full text and rfc822 format available.

Message #30 received at 2400 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Xavier Maillard <xma <at> gnu.org>
Cc: 2400 <at> debbugs.gnu.org
Subject: Re: bug#2400: 23.0.90; shell-mode: garbage in prompt
Date: Fri, 20 Feb 2009 16:15:22 -0500
> 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\]\$

That's its value, not its definition.  Where do you set it and how?


        Stefan




Tags added: moreinfo Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Wed, 25 Feb 2009 08:25:04 GMT) Full text and rfc822 format available.

Added tag(s) notabug. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Fri, 15 Jul 2011 20:56:02 GMT) Full text and rfc822 format available.

Reply sent to Glenn Morris <rgm <at> gnu.org>:
You have taken responsibility. (Fri, 15 Jul 2011 20:56:02 GMT) Full text and rfc822 format available.

Notification sent to Xavier Maillard <xma <at> gnu.org>:
bug acknowledged by developer. (Fri, 15 Jul 2011 20:56:03 GMT) Full text and rfc822 format available.

Message #39 received at 2400-done <at> debbugs.gnu.org (full text, mbox):

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.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#2400; Package emacs. (Fri, 15 Jul 2011 20:59:02 GMT) Full text and rfc822 format available.

Message #42 received at 2400 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 2400 <at> debbugs.gnu.org
Subject: Re: bug#2400: 23.0.90; shell-mode: garbage in prompt
Date: Fri, 15 Jul 2011 16:58:09 -0400
Glenn Morris wrote:

>    ESC ] 2 ; txt ST        Set window title to txt

I meant to quote:

  ESC ] 0 ; txt ST        Set icon name and window title to txt.

which comes from the xterm-specific section of `man console_codes'.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 13 Aug 2011 11:24:03 GMT) Full text and rfc822 format available.

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.