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

I have to make some patch to make slime-presentation-streams work #730

Open
kchanqvq opened this issue Jul 30, 2022 · 1 comment
Open

I have to make some patch to make slime-presentation-streams work #730

kchanqvq opened this issue Jul 30, 2022 · 1 comment

Comments

@kchanqvq
Copy link

kchanqvq commented Jul 30, 2022

slime-presentation-streams doesn't do anything at all out of the box. I'm not sure if it's just because of my setup (SBCL 2.2.7) or slime-presentation-streams itself is to blamed. Anyways, I've made the following adjustments to make it work for me, can you take a look? I'm very possibly doing something wrong (my understanding of SLIME internals is far from satisfying), but if not, I'm happy to submit the patch.

  1. SWANK::SLIME-STREAM-P doesn't follow synonym streams, which is what *standard-output* bound to from my SLIME REPL, therefore it always returns NIL. I made it follows synonym stream indirections.
  2. For some reason the copied marker in slime-mark-presentation-start is also pushed forward by REPL outputs, therefore slime-mark-presentation-end will always have start=end and do nothing. I've changed it to save integer marker-position when target is nil. Will this do anything unexpected?
@luismbo
Copy link
Member

luismbo commented Aug 1, 2022

I'm not familiar with the details you've listed, but I believe that the main reason why slime-presentation-streams doesn't do anything on SBCL anymore is because the pretty printer patches have bitrotted:

;;; Get pretty printer patches for SBCL at load (not compile) time.
#+#:disable-dangerous-patching ; #+sbcl
(eval-when (:load-toplevel)
(handler-bind ((simple-error
(lambda (c)
(declare (ignore c))
(let ((clobber-it (find-restart 'sb-kernel::clobber-it)))
(when clobber-it (invoke-restart clobber-it))))))
(sb-ext:without-package-locks
(swank/sbcl::with-debootstrapping
(load (make-pathname
:name "sbcl-pprint-patch"
:type "lisp"
:directory (pathname-directory
swank-loader:*source-directory*)))))))

You may be able to see how they're supposed to work by using an older SBCL version (and re-enabling that patch), CMUCL, CCL or maybe Allegro CL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants