Wilfred / difftastic

a structural diff that understands syntax 🟥🟩
https://difftastic.wilfred.me.uk/
MIT License
21.19k stars 347 forks source link

Colours aren't shown in ansi-term in Emacs #177

Open Wilfred opened 2 years ago

Wilfred commented 2 years ago

Bold works fine, inspecting it shows:

There are text properties here:
  font-lock-face       ((:foreground "#eeeeec" :background "#2e3434" :inverse-video nil) :inherit term-bold)
  fontified            t

but no colours are shown for the output, even if using --color=always. Strangely cargo output colours are fine.

Could experiment with inspect TERM (looking for e.g. xtern-256color or eterm-color) but that doesn't help if always doesn't work.

Note that eshell gets bold and also italics, but no colour (even in cargo messages).

cannero commented 2 years ago

Made a short test, with --color=always it works for eshell for difftastic and cargo on windows with emacs 29. Without the color option I also don't get colors.

image

Wilfred commented 2 years ago

Yeah, colours look correct in eshell now, although some are missing in ansi-term still.

rmburg commented 10 months ago

Probably related: If I have difftastic configured as my default difftool in git like this:

[diff]
    external = difft

Then, diffs displayed by paru (which uses git's configured diff) are also missing colors (making them almost entirely useless).