inf-clojure icon indicating copy to clipboard operation
inf-clojure copied to clipboard

Implement ANSI filtering in process responses

Open arichiardi opened this issue 8 years ago • 4 comments

Just so that we don't lose information from previous discussions, inf-clojure at the moments does not properly parses or filters out ansi coming from the repl process. This is one of the caveats, we should start our repls with no coloring for it to work properly. Of course socket repl is always the best and most reliable way here.

If folks think it is worth having colors, we can take some inspiration from sbt-mode-comint, or some SO answer.

arichiardi avatar Jul 10 '17 10:07 arichiardi

AFAICT, the suggestion to use :repl-options {:color false} in lein's project.clj is not working, and I don't see it listed as an option here: https://github.com/technomancy/leiningen/blob/master/sample.project.clj

I'm only experimenting with inf-clojure setup, but I immediately notice that the mini-buffer is really garbled with ansi color codes when point is on a function and trying to show its docstring.

MicahElliott avatar Aug 13 '17 01:08 MicahElliott

I saw that parameter in the reply repo and I had to dig into the source. Thanks for trying, I think it was working here. I use lein with the socket repl only and I found it pretty seamless.

arichiardi avatar Aug 13 '17 07:08 arichiardi

The function building the options for reply is this one and it seems the options is passed through.

It might require some more digging in order to solve the mistery, but I saw the option here.

arichiardi avatar Mar 03 '18 19:03 arichiardi

@arichiardi I would like to tackle this one and make sure that we tell lein to start without coloring. Do you have an easy way to reproduce colored output with lein? What is a normal use case?

charignon avatar Jan 24 '19 03:01 charignon