Skip to content

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

@cemerick

Description

@cemerick

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.)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions