From ce3b14d991b7df7a331caee8ba615fdfc85a26fd Mon Sep 17 00:00:00 2001 From: Correl Roush Date: Tue, 28 Mar 2017 16:02:51 -0400 Subject: [PATCH] [emacs] Support ANSI colors in compilation buffers --- .emacs.d/emacs.org | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.emacs.d/emacs.org b/.emacs.d/emacs.org index 1ae672c..12c357b 100644 --- a/.emacs.d/emacs.org +++ b/.emacs.d/emacs.org @@ -1052,6 +1052,19 @@ Because typing out "yes" and "no" is irritating. #+BEGIN_SRC emacs-lisp (defalias 'yes-or-no-p #'y-or-n-p) #+END_SRC +** Support ANSI colors in compilation buffers + +http://stackoverflow.com/a/13408008 + +#+name: other +#+BEGIN_SRC emacs-lisp + (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) +#+END_SRC * Custom settings Store options set via =customize-*= in a separate file (Emacs stores them in =init.el= by default).