millejoh / emacs-ipython-notebook

Jupyter notebook client in Emacs
http://millejoh.github.io/emacs-ipython-notebook/
GNU General Public License v3.0
1.47k stars 123 forks source link

[Improvement] A way to hide markdown blobs? #893

Open liar666 opened 4 months ago

liar666 commented 4 months ago

Hi,

Someone sent me an IPython notebook with a markdown cell that includes an image. The data for this image is included as a blob inside the cell.

In EIN, the whole data blob appears, as seen in the following screenshot:

screenshot_2024-03-05-10 38

As the picture is quite big, the data blob makes the whole IPython notebook unusable. The image data blob represents more than 90% of the content of the notebook. Moving around the code/cells is awful and takes ages.

I couldn't find a way to make things usable, apart removing the image (which is not a solution in my case as the Notebook is not mine and the main developer want to keep the image inside, since it works perfectly in Jupyter & ggColab). All the discussions about adding folding to non output cells (in the issues or forums like SE/SO) seems to lead to too much difficulties for the developers.

Is there a simple stupid solution to hide the blob content I couldn't find myself?

Would it be possible to detect such blobs and display only the first line/few bytes?

Thanks