unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#2400: 23.0.90; shell-mode: garbage in prompt
@ 2009-02-20  1:25 Xavier Maillard
  2009-02-20  3:43 ` Stefan Monnier
  0 siblings, 1 reply; 8+ messages in thread
From: Xavier Maillard @ 2009-02-20  1:25 UTC (permalink / raw)
  To: emacs-pretest-bug

My prompt is rendered with garbage like this:

^[]0;xma@zogzog:~/var/spool/mail\a^[]0;xma@zogzog:~/var/spool/mail\a[xma@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






^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#2400: 23.0.90; shell-mode: garbage in prompt
@ 2009-02-20  2:00 Chong Yidong
  0 siblings, 0 replies; 8+ messages in thread
From: Chong Yidong @ 2009-02-20  2:00 UTC (permalink / raw)
  To: Xavier Maillard; +Cc: 2400

> 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?






^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#2400: 23.0.90; shell-mode: garbage in prompt
  2009-02-20  1:25 Xavier Maillard
@ 2009-02-20  3:43 ` Stefan Monnier
  0 siblings, 0 replies; 8+ messages in thread
From: Stefan Monnier @ 2009-02-20  3:43 UTC (permalink / raw)
  To: Xavier Maillard; +Cc: 2400

> My prompt is rendered with garbage like this:
> ^[]0;xma@zogzog:~/var/spool/mail\a^[]0;xma@zogzog:~/var/spool/mail\a[xma@zogzog 00:36:00 mail]$ 

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


        Stefan







^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#2400: 23.0.90; shell-mode: garbage in prompt
@ 2009-02-20  9:25 Xavier Maillard
  2009-02-20 21:15 ` Stefan Monnier
  2011-07-15 20:55 ` Glenn Morris
  0 siblings, 2 replies; 8+ messages in thread
From: Xavier Maillard @ 2009-02-20  9:25 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 2400


   > My prompt is rendered with garbage like this:
   > ^[]0;xma@zogzog:~/var/spool/mail\a^[]0;xma@zogzog:~/var/spool/mail\a[xma@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@zogzog 00:36:00 mail] here.

Regards,

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






^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#2400: 23.0.90; shell-mode: garbage in prompt
@ 2009-02-20  9:25 Xavier Maillard
  0 siblings, 0 replies; 8+ messages in thread
From: Xavier Maillard @ 2009-02-20  9:25 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 2400


   > 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






^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#2400: 23.0.90; shell-mode: garbage in prompt
  2009-02-20  9:25 Xavier Maillard
@ 2009-02-20 21:15 ` Stefan Monnier
  2011-07-15 20:55 ` Glenn Morris
  1 sibling, 0 replies; 8+ messages in thread
From: Stefan Monnier @ 2009-02-20 21:15 UTC (permalink / raw)
  To: Xavier Maillard; +Cc: 2400

> 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






^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#2400: 23.0.90; shell-mode: garbage in prompt
  2009-02-20  9:25 Xavier Maillard
  2009-02-20 21:15 ` Stefan Monnier
@ 2011-07-15 20:55 ` Glenn Morris
  2011-07-15 20:58   ` Glenn Morris
  1 sibling, 1 reply; 8+ messages in thread
From: Glenn Morris @ 2011-07-15 20:55 UTC (permalink / raw)
  To: 2400-done

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@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.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#2400: 23.0.90; shell-mode: garbage in prompt
  2011-07-15 20:55 ` Glenn Morris
@ 2011-07-15 20:58   ` Glenn Morris
  0 siblings, 0 replies; 8+ messages in thread
From: Glenn Morris @ 2011-07-15 20:58 UTC (permalink / raw)
  To: 2400

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'.





^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-07-15 20:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-20  2:00 bug#2400: 23.0.90; shell-mode: garbage in prompt Chong Yidong
  -- strict thread matches above, loose matches on Subject: below --
2009-02-20  9:25 Xavier Maillard
2009-02-20  9:25 Xavier Maillard
2009-02-20 21:15 ` Stefan Monnier
2011-07-15 20:55 ` Glenn Morris
2011-07-15 20:58   ` Glenn Morris
2009-02-20  1:25 Xavier Maillard
2009-02-20  3:43 ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).