cider icon indicating copy to clipboard operation
cider copied to clipboard

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

Open maacl opened this issue 5 years ago • 7 comments

Expected behavior

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

Actual behavior

[42ml 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

maacl avatar Aug 14 '20 10:08 maacl

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.

bbatsov avatar Aug 14 '20 10:08 bbatsov

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

maacl avatar Aug 14 '20 11:08 maacl

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!

stale[bot] avatar Nov 14 '20 05:11 stale[bot]

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.

bbatsov avatar Nov 21 '20 09:11 bbatsov

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

stale[bot] avatar Dec 24 '20 11:12 stale[bot]

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

maacl avatar Feb 06 '23 08:02 maacl