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

From: Wolfgang Jenkner <[email-masked]>
Date: Tue, 06 Nov 2012 02:24:29 +0100

On Tue, Nov 06 2012, Dima Kogan wrote:

> Previously, I would do M-x shell, and then evaluate the new defun; this produced
> the results I described earlier.

Too late, the function must be redefined before the first prompt is
sent.  I thought it would be simpler to give you the rewritten defun
separately instead of having you patching ansi-color.el ;-)

> You just asked for a different order: load ansi-color, comint, THEN eval defun,
> THEN M-x shell. That produces different colored results: everything looks
> correct except the prompt is all blue all the time. Nothing has nil face. Is
> this the expected behavior with that defun

Yes.  As you found out in your original report the prompt coloring has
been broken for longer.  If you customize the comint-highlight-prompt
face so that it doesn't inherit from minibuffer-prompt (which does the
blue colouring), you'll see that the current prompt is actually coloured
correctly but for the previous prompts, comint-highlight-prompt just
replaces the ansi-color faces.  That's weird.  Somebody should at some
point do something about it ;-)

In any case, you submitted a separate report about the prompt issue,
viz. bug#11883.

So, I'd say that the issue at hand is solved.  I'll just try to rewrite
the new ansi-color-apply-sequence in a less ugly way.

Wolfgang