Skip to content

Disable pretty print when fetching lumo arglists #84

New issue

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

By clicking “No 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? No Sign in to your account

Merged
merged 1 commit into from
Jul 5, 2017

Conversation

arichiardi
Copy link
Contributor

Lumo has pretty print by default enabled. So this fix is necessary in order to avoid seeing newlines in eldoc.

@arichiardi arichiardi mentioned this pull request Jul 2, 2017
4 tasks
inf-clojure.el Outdated
@@ -703,7 +703,7 @@ If you are using REPL types, it will pickup the most approapriate
(define-obsolete-variable-alias 'inf-clojure-arglist-command 'inf-clojure-arglists-form "2.0.0")

(defcustom inf-clojure-arglists-form-lumo
"(pr-str (lumo.repl/get-arglists \"%s\"))"
"(do (set! lumo.repl/*pprint-results* false) (lumo.repl/get-arglists \"%s\"))"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why set this every time? I'd simply let-bind it around the other form.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let bind does not work in cljs bootstrap. Still I guess I could do it once. There is a problem though...it is global so I might actually need to rethink this solution.

@arichiardi
Copy link
Contributor Author

Cannot think about a better solution. The only one would be to post process the output and make it single-lined after the evaluation. We alrerdy have all the pieces in place, just need to hook the post process function.

@arichiardi
Copy link
Contributor Author

Found a hack for this, works fine and does avoid changing the value.

@bbatsov bbatsov merged commit 9fa8f37 into clojure-emacs:master Jul 5, 2017
@bbatsov
Copy link
Member

bbatsov commented Jul 5, 2017

Looks pretty ugly, but I guess that's the best we can do for now.

@arichiardi arichiardi deleted the fix-lumo-eldoc branch January 2, 2018 02:56
No Sign up for free to join this conversation on GitHub. Already have an account? No Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants