gcv / julia-snail

An Emacs development environment for Julia
GNU General Public License v3.0
235 stars 23 forks source link

Only every second image is displayed immediately with multimedia-buffer-style `:multi` if window is not high enough for two images #112

Closed TS-CUBED closed 2 years ago

TS-CUBED commented 2 years ago

I'd like to use the :multi option for the multimedia buffer, and this works nicely if the image size is small enough for two images to fit into the buffer.

Then the sequence is as follows:

  1. first plot displayed at the top
  2. second plot displayed below first plot (i.e. two plots visible)
  3. third plot is shown at the top again (i.e. one plot visible, the other two can be scrolled to)
  4. fourth plot is shown below the third plot (i.e two plots again)
  5. and so on ...

If I increase the image size (both to get better dpi/resolution as well as to fill the multimedia buffer better), then the sequence becomes:

  1. first plot is shown
  2. second plot is not shown (I can get to it by scrolling up in the multimedia buffer)
  3. third plot is shown (unless I scrolled to make the second one visible)
  4. fourth plot is not shown again
  5. and so on ....

If I scroll up to make the plots visible after every plot that doesn't show, then the next plot will always not show at first and will only become visible after scrolling up.

Could it be that there is a newline or empty line printed to the buffer after the plot? There seems to be an empty line between the plots. Could that push the image off screen?

It doesn't really matter if the image size is such that the image and that empty line do fit (they do), though.

Not sure what's going on - fundamental buffers and images always are weird with scrolling.

Edit: it is also the same if I do not increase the image size, but work on a smaller screen, so there is only room for one image in the mm buffer.

gcv commented 2 years ago

I've noticed this before, and wrote it off as buffer-with-images weirdness. Let's keep this ticket around as a note that it should be fixed (maybe at the Emacs level), but I doubt I'll have time to investigate this any time soon. Patches and suggestions welcome, as always.

gcv commented 2 years ago

Didn't mean to close this ticket yet... GitHub is a little too aggressive with parsing commit strings.

gcv commented 2 years ago

Should be fixed in https://github.com/gcv/julia-snail/commit/0a435e0f8f61c8fcb11f859fc8efbf0d36931134, please reopen if this is still a problem.