clojure-emacs / cider

The Clojure Interactive Development Environment that Rocks for Emacs
https://cider.mx
GNU General Public License v3.0
3.54k stars 645 forks source link

l printed as 102nd char when printing to CIDER repl w. clansi or clojure-term-colors #2891

Open maacl opened 4 years ago

maacl commented 4 years ago

Expected behavior

Actual character in string printed in correct colors. This works using a regular lein repl.

Actual behavior

l is printed what appears to be every 103rd char.

Steps to reproduce the problem

(print (apply str (repeat 103 (style "l" :bg-green))))

using clansi (https://github.com/ams-clj/clansi) or equivalent in (https://github.com/trhura/clojure-term-colors)

Environment & Version information

CIDER version information

;; CIDER 0.26.0 (package: 20200805.827) (Nesebar), nREPL 0.8.0
;; Clojure 1.10.1, Java 13.0.1

Lein/Boot version

N/A

Emacs version

GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0) of 2020-08-10

Operating system

Ubuntu 20.04 LTS

bbatsov commented 4 years ago

If you disable streamed printing or increase the size of the result chunks this will work as it does in lein repl. The problem with chunked output is that it can't be colorized consistently (colorization gets applied to each chunk individually). See https://docs.cider.mx/cider/0.26/repl/configuration.html#font-locking-of-results for details.

maacl commented 4 years ago

Doing (setq cider-print-buffer-size (* 8 1024)) doesn't make a difference for me. How would I disable streaming print?

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution and understanding!

bbatsov commented 3 years ago

Hmm, if the colors don't get fixed with such big chunks it might be that the problem is something is. I see there's an ansi-color-apply filter applied to the REPL output, so I can't imagine what else could it be, though.

stale[bot] commented 3 years ago

This issues been automatically closed due to lack of activity. Feel free to re-open it if you ever come back to it.

maacl commented 1 year ago

I don't think this has been fixed. I am happy to provide further input and test if it is re-opened.