GNU bug report logs - #19843
comint-mode obliterates previous faces with `comint-highlight-prompt'

Previous Next

Package: emacs;

Reported by: Jeff Gran <jeff.gran <at> roguewave.com>

Date: Thu, 12 Feb 2015 03:41:02 UTC

Severity: normal

Tags: confirmed, patch

Merged with 20084, 20658

Found in version 24.4

Fixed in version 25.1

Done: Wolfgang Jenkner <wjenkner <at> inode.at>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Jeff Gran <jeff.gran <at> roguewave.com>
To: 19843 <at> debbugs.gnu.org
Subject: bug#19843: comint-mode obliterates previous faces with `comint-highlight-prompt'
Date: Wed, 11 Feb 2015 18:53:18 -0700
[Message part 1 (text/plain, inline)]
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

[Message part 2 (text/html, inline)]

This bug report was last modified 10 years and 51 days ago.

Previous Next


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