emacs-jupyter / jupyter

An interface to communicate with Jupyter kernels.
GNU General Public License v3.0
936 stars 92 forks source link

Copying output of REPL #550

Open warnerwarner opened 2 months ago

warnerwarner commented 2 months ago

Hi,

I'm sorry if this has been asked before, but I can't seem to find anyone else who has mentioned this. Is it possible to put images or outputs of the repl into the kill ring to then yank in other documents?

Thanks

gmoutso commented 1 week ago

For the case of copying images into the clipboard, I have the function gm/copy-image-to-clipboard in here. Most functions were copied/modified from ox-clip.el. It will copy the image at point into the clipboard (the output in the jupyter repl or an opened image file or an org-mode fragment, etc.). How you can paste it in emacs again is beyond this function, but see org-paste-link-xclip here.