From 9e835276715b46099f08c4e7e8981bef0deff004 Mon Sep 17 00:00:00 2001 From: fpi Date: Sat, 6 Jun 2020 15:38:19 +0200 Subject: Add support for ansi-colors in compilation buffer output --- emacs-init.org | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/emacs-init.org b/emacs-init.org index 416a5ef..6f114fd 100644 --- a/emacs-init.org +++ b/emacs-init.org @@ -3217,6 +3217,19 @@ For now I use this bad code. (lambda () (define-key gnus-summary-mode-map (kbd ";") 'bbdb-mua-edit-field))) #+end_src +** Compile +Fix ansi colors in compile buffers. From [[https://endlessparentheses.com/ansi-colors-in-the-compilation-buffer-output.html][endlessparentheses]]. +#+begin_src emacs-lisp +(use-package compile + :config + (require 'ansi-color) + (defun endless/colorize-compilation () + "Colorize from `compilation-filter-start' to `point'." + (let ((inhibit-read-only t)) + (ansi-color-apply-on-region + compilation-filter-start (point)))) + :hook (compilation-filter . endless/colorize-compilation)) +#+END_src ** Context aware hydra :PROPERTIES: :ID: 22750e48-aaee-4f60-bdce-1d511ebe3375 -- cgit v1.2.3