Cider: `*cider-error*` does not display single newline when printing Exception message

Created on 10 Nov 2017  ·  5Comments  ·  Source: clojure-emacs/cider

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"

bug stale

Most helpful comment

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

All 5 comments

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.

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

That would be nice!

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!

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

Was this page helpful?
0 / 5 - 0 ratings