Skip to content

Instantly share code, notes, and snippets.

@sellout
Created April 24, 2014 05:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sellout/11242089 to your computer and use it in GitHub Desktop.
Save sellout/11242089 to your computer and use it in GitHub Desktop.
(defun ansi-color-insertion-filter (proc string)
(when (buffer-live-p (process-buffer proc))
(with-current-buffer (process-buffer proc)
(save-excursion
;; Insert the text, advancing the process marker.
(goto-char (process-mark proc))
(insert (ansi-color-apply string))
(set-marker (process-mark proc) (point)))
(goto-char (process-mark proc)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment