From f7a3f02ed6d86873036e00f0870ff8f122c0e84b Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Thu, 21 Sep 2017 03:28:13 -0400 Subject: [PATCH] Make compilation-mode use ansi-color escapes --- .emacs.d/init.el | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index cda92c9..30eb32b 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -67,6 +67,14 @@ ("C-S-z" . compile)) :config (setq compilation-scroll-output 'first-error) + + (require 'ansi-color) + (add-hook 'compilation-filter-hook + (lambda () + (toggle-read-only 0) + (ansi-color-apply-on-region compilation-filter-start (point)) + (toggle-read-only 1))) + (add-hook 'compilation-start-hook (lambda (x) (setq-local scroll-up-aggressively 0.0))))