pkryger / difftastic.el

Wrapper for difftastic
GNU General Public License v3.0
44 stars 4 forks source link

No colors/faces #8

Open johanvts opened 4 months ago

johanvts commented 4 months ago

On windows I get no colors in the diff. The windows terminal shows the colors nicely when using difftastic directly, but calling ex. Difftastic show on a change via. magit produces a buffer that has all the correct diff, but it's only black on white text. No colors. Calling normal Dwim (d-d) produces a buffer with nice red/green colors for the changes. I'm using the use-package configuration from the readme and no face customization. I was expecting to see the same colors as used in normal magit diff (Dwim?).

pkryger commented 4 months ago

@johanvts thank you for the report. Without debugging what really happens it's quite hard for me to tell what's really going on. And I don't have access to any computer running Windows ATM to try to reproduce the issue.

Nevertheless, I pushed a small change, with a hope it will address the issue you're seeing. It should made it to MELPA in next few hours or so. Please reinstall and check if that helps with the issue. If not, feel free to re-open the issue and I'll try to debug more. When re-opening please provide a bit more details, i.e., how do you run Emacs on Windows (WSL? something else?), GUI or text mode?

johanvts commented 4 months ago

Thanks, I didn't realize the package was on MELPA, might be an idea to mention that in the README to increase uptake. Installed 20240325.809 from there now, still an issue in that version. I don't get any errors when debugging or using debug-on-error. Probably a windows machine will be needed to resolve this issue, I might try to go deeper myself (no promises). If anyone reads this and has things working on windows please respond.

pkryger commented 4 months ago

Thanks, I didn't realize the package was on MELPA, might be an idea to mention that in the README to increase uptake.

Thanks for the hint. Improved the REDME.

Installed 20240325.809 from there now, still an issue in that version. I don't get any errors when debugging or using debug-on-error.

I am not surprised there are no errors. From the initial description it seems that difft does not generate ANSI colour sequences when called from Emacs' make-process. difftastic (the Emacs package) relies on these sequences to apply colours. However, the "black on white text" suggested there were no ANSI sequences.

Probably a windows machine will be needed to resolve this issue, I might try to go deeper myself (no promises). If anyone reads this and has things working on windows please respond.

To check if the hypothesis above is true, you can comment out the whole :filter section in difftastic--run-command and see how the buffer would look like (after evaluating the defun and re-running difftastic). If there are ANSI colour sequences (basically text that looks like ) it means the hypothesis is false.

Please let me know if you're willing to get deeper into it, I'm happy to assist.