ANSI Coloring in Compilation Mode

There’s already a function for applying color to comint buffers. You simply need to enable it on compilation buffers: (require ‘ansi-color) (defun colorize-compilation-buffer () (toggle-read-only) (ansi-color-apply-on-region compilation-filter-start (point)) (toggle-read-only)) (add-hook ‘compilation-filter-hook ‘colorize-compilation-buffer) Color writing programs should check the TERM environment variable and the terminfo database to check if the terminal supports color. In practice, a … Read more