This question already has an answer here:

I am running a process from within emacs which uses ANSI color codes in its output.

I'm using start-process to create the process, and provided a custom buffer name for the process's output

(start-process "foo" "*Foo*" foo-command foo-args)

If I open *Foo* buffer, the ANSI color codes are printed in their raw format to the buffer

^[[36msome output message^[[m
^[[1;35msome output message^[[m
^[[1;34msome output message^[[m

I see in this SO answer it is possible to add colorization to a buffer; however I'm unsure as to how to do it with a buffer created using start-process

Is it possible to convert those ANSI color codes to colorised output in my *Foo* buffer?

marked as duplicate by Gilles 'SO- stop being evil' Jun 3 '17 at 21:29

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Please do not post the same question here and to StackOverflow. Choose one. Thx. – Drew Jun 3 '17 at 21:42
  • @gilles the linked duplicate is from 2015 and doesn't have a relevant answer – Steve Lorimer Jun 3 '17 at 21:52
  • Yes, but it's still a duplicate: any answer to one question answers the other question. Duplicate doesn't mean “already has an answer”, it means “any answer would apply”. – Gilles 'SO- stop being evil' Jun 3 '17 at 22:04
  • @Gilles I acknowledge that, however, don't you think age has an impact on the likelihood of a question being answered? I would say there is more likelihood of someone seeing an unanswered question come up in their feed and answering it, than there is of someone excavating a 2 year old unanswered question. I also think the likelihood of someone coming to this question, seeing the fact it's marked as a duplicate, and following the link to post an answer there is significantly lower than had it been left open. – Steve Lorimer Jun 3 '17 at 22:10
  • But if the questions are not marked as duplicate, then you halve the chances that someone will answer yours. Marking duplicates as such helps to get answers. – Gilles 'SO- stop being evil' Jun 3 '17 at 22:12

Browse other questions tagged or ask your own question.