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

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

bug#19843: comint-mode obliterates previous faces with `comint-highlight


From: Jeff Gran
Subject: bug#19843: comint-mode obliterates previous faces with `comint-highlight-prompt'
Date: Wed, 11 Feb 2015 18:53:18 -0700
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

I believe this is easy to reproduce. I'm happy to help with additional info if needed.

In shell-mode, I have a PS1 that has ansi-color control codes in it. But it is obliterated by the `comint-highlight-prompt' face.

In previous versions of emacs, the comint-highlight-prompt was an overlay, however this commit:

https://github.com/emacs-mirror/emacs/commit/74c5d24c74e3167db6e3ee01831584c99905bb70

...changed it to just apply the face instead of overlaying it. It mentions Bug#14744, but I'm not sure what that is. I preferred having it overlay.

However, earlier than that there was a `defcustom' option that switched the comint-highlight-prompt on or off altogether, which is probably the best solution. Again, not sure why that was ever removed, except that maybe that author in 2002 decided that using an overlay that could be set to nil accomplishes the same goal, which is the option of having or not having a prompt highlight face applied.

See https://github.com/emacs-mirror/emacs/commit/8b1d2946a2f9e6779c405ee81f0162470d2eb79b

When I type "C-u C-x =" on the characters that should be colored in my prompt, I see that there is ansi-color-face property, but it is not visible because the face is applied on top of it:

There are text properties here:
  ansi-color-face      (foreground-color . "#3AaCbf")
  field                output
  font-lock-face       comint-highlight-prompt
  fontified            t
  front-sticky         (read-only)
  inhibit-line-move-field-capture t
  read-only            t
  rear-nonsticky       t


I think the best solution is probably to put the boolean custom options back in so that the user can specify whether they want the font-face applied or not.

-- 
Jeff Gran


reply via email to

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