Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cider-result popup buffer doesn't support the ansi escape sequences #1656

Closed
BrunoBonacci opened this issue Apr 8, 2016 · 5 comments
Closed
Labels

Comments

@BrunoBonacci
Copy link

Expected behavior

Ansi escape sequences are rendered properly like in the cider repl buffer

Actual behavior

ansi escape sequences are printed-out without proper rendering

Steps to reproduce the problem

  • Add [com.taoensso/timbre "4.3.1"] to your project
  • start a repl
  • open a clojure buffer and type:
(require '[taoensso.timbre :as log])
(log/error (RuntimeException. "boom") "bang")
  • evaluate these in the repl and you'll see a rendered output
  • evaluate these lines with C-c C-p and you'll see the escape codes.

Environment & Version information

CIDER version information

Tried on:
CIDER 0.12.0snapshot (package: 20160405.2359), nREPL 0.2.12 and CIDER 0.11.0
on Clojure 1.7.0, Java 1.8.0_45

Emacs version

Emacs 24.5.1

Operating system

OS X 10.11 "El Capitan"

@bbatsov
Copy link
Member

bbatsov commented Apr 10, 2016

While fixing this is simple, it seems to me the whole functionality is kind of broken. Why are we dumping the stdout and the stderr in a clojure-mode buffer, together with the result? This makes no sense to me.

@Malabarba @cichli Any thoughts?

@bbatsov bbatsov added the bug label Apr 10, 2016
@BrunoBonacci
Copy link
Author

I somehow agree with you, the output of the cider-result should in norm contain only the result of the function and not the side effect. However not all functions are pure and having stdout and stderr redirected as it is now, it makes it way easier to work with, rather than going to look for the repl server output.
It is really only from a practical standpoint.

@bbatsov
Copy link
Member

bbatsov commented Apr 10, 2016

Perhaps. On the other hand, this is marked as a clojure-mode buffer and all the output gets corrupted there because of this, so it looks really ugly to me (not to mention it's not exactly clear what's the result and what's the output in some situations).

I'll fix your particular problem, but it definitely seems more important to me to reconsider this functionality at a more basic level.

@BrunoBonacci
Copy link
Author

Thanks. I'm a big fan of this functionality. The inline evaluation is good only for very small results, but data structures do not render nicely inline. I now got used to it and it is my main evaluation method.
So if you want review it, I would be glad to give you early feedback on the idea or the first draft.

@bbatsov
Copy link
Member

bbatsov commented Apr 10, 2016

I'll fix this for now and we can discuss potential improvements in another ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants