ezStan icon indicating copy to clipboard operation
ezStan copied to clipboard

ezStan printing / logging messed up in terminal / tmux

Open mikekaminsky opened this issue 6 years ago • 2 comments

watch_stan() in my tmux pane is printing in a bizarrely offset manner that makes it unusable:

Screen Shot 2019-06-25 at 1 07 21 PM

Not sure if you've ever tested this (or if you're only focused on the rstudio audience). I took a look under the hood and nothing jumps out at me as being problematic, but this is not an area where I have a ton of expertise.

I've tried this without the loggr library, with the mike-lawrence/loggr and with the smbache/loggr all with the same effect.

I'm happy to work on fixing this (and submitting a PR) if you believe you have an idea of what the issue is and what the fix might be. :)

mikekaminsky avatar Jun 25 '19 18:06 mikekaminsky

This happens because getOption("width") (used in the append_string function here ) apparently isn't reliable across GUI environments. I know it worked back when I was on a mac, but now even on my own system (Rstudio in Linux) it's not spaced correctly. watch_stan has a spacing argument that you can play with to try to get better alignment (inc. using negative numbers), but I admit that's still not ideal.

mike-lawrence avatar Jun 25 '19 18:06 mike-lawrence

Blerg! That's gross. I should have read the docs closer, because just using one_line_per_chain=FALSE is good enough for me. You could consider switching the defaults for that so it's less jarring to newbies getting started.

Happy to either close this issue or leave it open in case people come looking in the future :)

mikekaminsky avatar Jun 25 '19 18:06 mikekaminsky