bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#12792: 24.2.50; shell-mode renders all its output in a yellow face


From: Dima Kogan
Subject: bug#12792: 24.2.50; shell-mode renders all its output in a yellow face
Date: Sun, 4 Nov 2012 12:24:56 -0800

> On Sun, 04 Nov 2012 14:49:50 +0100
> Wolfgang Jenkner <wjenkner@inode.at> wrote:
>
> On Sun, Nov 04 2012, Dima Kogan wrote:
> 
> > 1. I start an 'emacs -Q' with the latest ansi-colors.el
> > 2. I evaluate the defun you pasted
> 
> Did you load ansi-colors /before/ step 2?
> 
> If so, what is your PS1 set to?  What are the (local) values of
> `comint-prompt-regexp' and `comint-use-prompt-regexp' in the "*shell*"
> buffer?
> 
> Wolfgang


Hi Wolfgang. You're right; I was loading ansi-colors.el after the eval, which
was overwriting the new defun. On top of that, I just ran some more controlled
tests, and I can now see that some of my descriptions were wrong. Stock bash
actually behaves ok (I did test it previously, but must have made a mistake).
Note "behaves ok" here means that the nil faces are gone; the prompts are still
not colored even with bash.

zsh is the main shell I use that looks to be problematic. I can consistently
observe the issues if I delete all ~/.zsh* files, then add just the following to
the .zshrc:

export PS1="%F{red}%n@%m%f:%F{yellow}%~%f%(!.#.$) "

This sets a bash-like prompt. With the latest ansi-colors.el I see the
everything-is-yellow and face-is-nil issues from before. If I also then evaluate
the defun, I observe the behavior I described previously, where everything is
one color, until some ansi code is encountered. After the defun the wrong color
becomes red instead of yellow, suggesting that something isn't being reset
properly.

I'm using the zsh package from Debian version 4.3.17-1.

comint-prompt-regexp is a variable defined in `comint.el.gz'.
Its value is "^[^#$%>
]*[#$%>] *"

comint-use-prompt-regexp is a variable defined in `comint.el.gz'.
Its value is nil

(describe-face) with the point inside the prompt says the prompt face is
'comint-highlight-prompt'.

Sorry for the misniformation

dima





reply via email to

[Prev in Thread] Current Thread [Next in Thread]