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-error* does not display single newline when printing Exception message #2109

Closed
bhb opened this issue Nov 10, 2017 · 5 comments
Closed

Comments

@bhb
Copy link

bhb commented Nov 10, 2017

Expected behavior

I expect that evaluating (throw (ex-info "foo\nbar" {})) would print the following output to the *cider-error* buffer:

1. Unhandled clojure.lang.ExceptionInfo
   foo
   bar
   {}

Note that if I evaluate (throw (ex-info "foo\n\nbar" {})) (two newlines instead of one) the newlines are shown in *cider-error*:

1. Unhandled clojure.lang.ExceptionInfo
   foo
   
   bar
   {}

so the problem appears to only occur for a single newline.

Actual behavior

In the first case above (evaluating (throw (ex-info "foo\nbar" {}))), the output in *cider-error* is:

1. Unhandled clojure.lang.ExceptionInfo
   foo bar
   {}

Steps to reproduce the problem

  1. lein new cider-bug-report
  2. Make project.clj look like code below
  3. lein repl
  4. In emacs cider-connect
  5. connect to REPL
  6. In cider REPL buffer, eval (throw (ex-info "foo\nbar" {}))
;; project.clj
(defproject cider-bug-report "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url "http://example.com/FIXME"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :plugins [[cider/cider-nrepl "0.15.1"]]
  :dependencies [[org.clojure/clojure "1.9.0-RC1"]])

Environment & Version information

CIDER version information

;; CIDER 0.15.1 (London), nREPL 0.2.12
;; Clojure 1.9.0-RC1, Java 1.8.0_151

Lein/Boot version

Leiningen 2.8.0 on Java 1.8.0_151 Java HotSpot(TM) 64-Bit Server VM

Emacs version

GNU Emacs 24.4.1 (x86_64-apple-darwin14.1.0) of 2015-03-19 on miniyosemite.local

Operating system

OS X 10.11.6 "El Capitan"

@vspinu
Copy link
Contributor

vspinu commented Nov 10, 2017

The message is "filled" on the emacs side. I guess this was done to save space, but in my experience most of the time this harms the experience (see output from core.spec for instance). Author of the message formats it for readability, and I don't think a tool should mess with that.

@bbatsov bbatsov added the bug label Dec 9, 2017
@bbatsov
Copy link
Member

bbatsov commented Dec 9, 2017

I'm guess we should either remove the filling or make it configurable.

@stathissideris
Copy link

That would be nice!

@stale
Copy link

stale bot commented May 8, 2019

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 stale bot added the stale label May 8, 2019
@stale
Copy link

stale bot commented Jun 7, 2019

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

@stale stale bot closed this as completed Jun 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants