joouha / euporie

Jupyter notebooks in the terminal
https://euporie.readthedocs.io
MIT License
1.62k stars 38 forks source link

[Q] Any ideas on how hard it is to display images in TUI emacs via the Kitty protocol? #4

Closed NightMachinery closed 3 years ago

NightMachinery commented 3 years ago

I have been wondering about this for some time, but I had not seen anyone who knows enough elisp and Kitty to ask.

NightMachinery commented 3 years ago

When I try using kitty +kitten icat ... in the various terminals of emacs (eshell, vterm), Kitty says the terminal is unsupported. Even something as basic as just showing a single image file instead of image

would be improve my QoL a lot.

joouha commented 3 years ago

I'm really not sure I'm afraid - I don't use emacs.

Basically, you'll need to get emacs to send the kitty graphics protocol escape sequences to stdin, along with the image data in base64 encoded chunks.

Have a read of this page, which describes the kitty image protocol: https://sw.kovidgoyal.net/kitty/graphics-protocol.html

Hopefully this points you in the right direction - good luck!