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

Previous Next

Package: emacs;

Reported by: Dima Kogan <dima <at> secretsauce.net>

Date: Sat, 3 Nov 2012 08:59:02 UTC

Severity: normal

Tags: patch

Found in version 24.2.50

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Dima Kogan <dima <at> secretsauce.net>
To: Wolfgang Jenkner <wjenkner <at> inode.at>
Cc: 12792 <at> debbugs.gnu.org
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 <at> 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




This bug report was last modified 12 years and 248 days ago.

Previous Next


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