简体   繁体   中英

Progress indicator bar auto changed line in cider-nrepl buffer

I'm trying to use the progress indicator bar from clj-progress .

The example code runs fine in lein repl console:

(use 'clj-progress.core)

(defn progress []
  (init 50)
  (reduce + (map  #(do (tick) (Thread/sleep 200) %)
                  (range 50)))
  (done))

The output like this (dynamic in progress):

[==================================================] 100% 50/50

When I tried in emacs under cider, the output like this:

 [==>                                               ] 4% 2/50     
 [===>                                              ] 6% 3/50     
 [====>                                             ] 8% 4/50     
 [=====>                                            ] 10% 5/50     
 [======>                                           ] 12% 6/50     
 [=======>                                          ] 14% 7/50     
 [========>                                         ] 16% 8/50     
 [=========>                                        ] 18% 9/50     
 [==========>                                       ] 20% 10/50     
 [===========>                                      ] 22% 11/50     
 [============>                                     ] 24% 12/50     
 [=============>                                    ] 26% 13/50     
 [==============>                                   ] 28% 14/50     
 [===============>                                  ] 30% 15/50     
 [================>                                 ] 32% 16/50     
 [=================>                                ] 34% 17/50     
 [==================>                               ] 36% 18/50     
 [===================>                              ] 38% 19/50     
 [====================>                             ] 40% 20/50     
 [=====================>                            ] 42% 21/50     
 [======================>                           ] 44% 22/50     
 [=======================>                          ] 46% 23/50     
 [========================>                         ] 48% 24/50     
 [=========================>                        ] 50% 25/50     
 [==========================>                       ] 52% 26/50     
 [===========================>                      ] 54% 27/50     
 [============================>                     ] 56% 28/50     
 [=============================>                    ] 58% 29/50     
 [==============================>                   ] 60% 30/50     
 [===============================>                  ] 62% 31/50     
 [================================>                 ] 64% 32/50     
 [=================================>                ] 66% 33/50     
 [==================================>               ] 68% 34/50     
 [===================================>              ] 70% 35/50     
 [====================================>             ] 72% 36/50     
 [=====================================>            ] 74% 37/50     
 [======================================>           ] 76% 38/50     
 [=======================================>          ] 78% 39/50     
 [========================================>         ] 80% 40/50     
 [=========================================>        ] 82% 41/50     
 [==========================================>       ] 84% 42/50     
 [===========================================>      ] 86% 43/50     
 [============================================>     ] 88% 44/50     
 [=============================================>    ] 90% 45/50     
 [==============================================>   ] 92% 46/50     
 [===============================================>  ] 94% 47/50     
 [================================================> ] 96% 48/50     
 [=================================================>] 98% 49/50     
 [==================================================] 100% 50/50     
 [==================================================] 100% 50/50 

Although it's not a big deal, I would like to know what caused this and whether there's any settings in cider to correct this?

Likely this library issues a sequence of console outputs and in CIDER you see all of them (or this might be some buffering artefact). You can file a ticket, but I doubt this is something worth fixing.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM