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

pprinting expressions _always_ uses window width as *print-right-margin* #1876

Closed
cemerick opened this issue Oct 30, 2016 · 4 comments
Closed

Comments

@cemerick
Copy link
Contributor

I have my splits around 120 columns each, so this is really not what I want: 120 columns pretty-printed isn't very…pretty. At least IMO.

It'd be nice to be able to disable the binding of *print-right-margin*, or set it at some fixed width in cider. Absent that, here's what I'm using:

; don't pprint wider than 80 columns, regardless of the width of the current split
(let ((-cider--pprint--orig (symbol-function 'cider--nrepl-pprint-request-plist)))
  (defun cider--nrepl-pprint-request-plist (right-margin &optional pprint-fn)
    (funcall -cider--pprint--orig 80 pprint-fn)))

(Go ahead, make fun of my elisp, I care not.)

@bbatsov
Copy link
Member

bbatsov commented Oct 30, 2016

It will be pretty easy to add some defcustom that would override the current default.

@dpsutton
Copy link
Contributor

Should we obey the fill-column variable in emacs and just ignore this completely?

@cemerick
Copy link
Contributor Author

Makes sense to me, especially given high DPI screens, etc.

@dpsutton
Copy link
Contributor

dpsutton commented Dec 7, 2016

I think this can be closed now.

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