Until recently I didn't use compilation mode much and preferred to compile in a terminal (for C/C++).
​
[Example output.](https://preview.redd.it/xo67ft2u9xb91.jpg?width=818&format=pjpg&auto=webp&s=56a7f9293fc9418bb0317324e08c580613de6200)
Compilation mode has some quirks that I wasn't sure how to workaround.
* No color (no support for color diagnostics for example).
* No support for outputting progress output onto a single line (ninja does this, ensuring only warnings/errors are shown in the final output).
* Erratic scrolling (scrolling jumps at times halfway down the screen, instead of smooth scrolling).
This made the experience with CMake/Ninja C/C++ projects not so great, as with anything Emacs related, it's always *possible* to tweak to your hearts content, nevertheless, I avoided compilation mode for years because of these limits.
More recently I looked into improving the behavior and with help on stackexchange, managed to resolve all these issues with surprising ease.
This left me wondering if It's worth a small package or proposing changes up-stream.
The changes are as follows:
(setq compilation-environment '("TERM=tmux-256color"))
(setq compilation-max-output-line-length nil)
(defun my/advice-compilation-filter (f proc string)
(funcall f proc (ansi-color-apply string)))
(advice-add 'compilation-filter :around #'my/advice-compilation-filter)
(advice-add 'compilation-filter :after #'my/advice-compilation-filter)
(add-hook 'compilation-mode-hook
(lambda ()
(setq-local compilation-scroll-output t)
(setq-local scroll-conservatively most-positive-fixnum)
(setq-local scroll-margin 0)))
\---
Edit, [made a package for this](https://codeberg.org/ideasman42/emacs-fancy-compilation).