Skip to content

Instantly share code, notes, and snippets.

@wngreene
Created September 23, 2016 18:06
Show Gist options
  • Save wngreene/87d8b4715212e44a42aa79668af090ee to your computer and use it in GitHub Desktop.
Save wngreene/87d8b4715212e44a42aa79668af090ee to your computer and use it in GitHub Desktop.
Snippet to fix colors in emacs compile buffer.
;; ansi-color.
;; https://emacs.stackexchange.com/questions/8135/why-does-compilation-buffer-show-control-characters
(use-package ansi-color
:ensure t
:config (progn
(defun my/ansi-colorize-buffer ()
(let ((buffer-read-only nil))
(ansi-color-apply-on-region (point-min) (point-max))))
(add-hook 'compilation-filter-hook 'my/ansi-colorize-buffer)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment