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

Image buffers #582

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

christophejunke
Copy link
Contributor

@christophejunke christophejunke commented Oct 20, 2020

First patch allows custom message to pass through swank.lisp without error.
The second one allows to pass base64 strings as :data directly

(swank::send-to-emacs
 `(:write-image (:data ,(base64:usb8-array-to-base64-string
                         (vecto:with-canvas (:width 64 :height 64)
                           (vecto:set-rgb-stroke 100 100 100)
                           (vecto:move-to 0 0)
                           (vecto:line-to 64 64)
                           (vecto:stroke)
                           (flexi-streams:with-output-to-sequence (out)
                             (vecto:save-png-stream out)))))
                " "))

In particular this allow :popup-buffer in contrib/slime-media.el to
be handled without error.
- do not mapcar over string
- let create-image be called with :data
@luismbo
Copy link
Member

luismbo commented Oct 21, 2020

Is the intent here to be able to write to the repl buffer only or to other buffers as well?

I have two improvement suggestions. Add a higher-level function to slime-media swank contrib to avoid sending swank messages directly. Use ed-rpc rather than removing the swank side message validation (or add a specific handler, but I think the ed-rpc way is nicer).

@christophejunke
Copy link
Contributor Author

christophejunke commented Oct 21, 2020

Is the intent here to be able to write to the repl buffer only or to other buffers as well?

other buffers as well, if possible; there should b an optional buffer parameter I presume.

Add a higher-level function to slime-media swank contrib to avoid sending swank messages directly.

Something like swank:send-image?

Use ed-rpc rather than removing the swank side message validation (or add a specific handler, but I think the ed-rpc way is nicer).

I don't really know what ed-rpc is so I'll have a look.

Thank you

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

Successfully merging this pull request may close these issues.

None yet

2 participants