gcv / julia-snail

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

Swap \n to before image insertion #113

Closed TS-CUBED closed 2 years ago

TS-CUBED commented 2 years ago

This should fix #112

TS-CUBED commented 2 years ago

I have moved the \n to before the insertion of the plot. That way it will always show the new plot.

One could argue that the version without the \n works even better with scrolling, but then the plots are not clearly separated. Not sure which behaviour is preferable.

The version as in this PR works better will scrollwheel scrolling (one plot scroll per click on the wheel), while requiring TWO up/down arrow keystrokes to scroll to the next plot (as it was before). Since the scrollwheel jumps TWO plots if the \n is omitted, I would say the version as I PR'ed it shows the most consistent behaviour overall. Despite the general emacs weirdness with inline images.

gcv commented 2 years ago

The logic in this PR only doesn't work for me. It only inserts newlines instead of plots. Line 1494 in the patched version inserts a newline whenever shortest evaluates to true, but not a plot image.

I think I have a simpler solution. Please take a look at commit 0a435e0 and see if that works for you.

TS-CUBED commented 2 years ago

Hmm, works for me here. But I patched this one and my installed version separately. Could have made a mistake when making the changes in the fork.

In any case, it works in my implementation, so whichever way, swapping newline/image (image after newline) should fix the problem.


From: gcv @.> Sent: Tuesday, September 27, 2022 5:27:51 AM To: gcv/julia-snail @.> Cc: Torsten Schenkel @.>; Author @.> Subject: Re: [gcv/julia-snail] Swap \n to before image insertion (PR #113)

CAUTION: This message was sent from outside the University, purportedly from @.*** .

Please check the sender is legitimate before responding. Please treat any links or attachments with care - do not follow or open them unless you are sure they are genuine.

The logic in this PR only doesn't work for me. It only inserts newlines instead of plots. Line 1494 in the patched version inserts a newline whenever shortest evaluates to true, but not a plot image.

I think I have a simpler solution. Please take a look at commit 0a435e0https://github.com/gcv/julia-snail/commit/0a435e0f8f61c8fcb11f859fc8efbf0d36931134 and see if that works for you.

— Reply to this email directly, view it on GitHubhttps://github.com/gcv/julia-snail/pull/113#issuecomment-1258953499, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMOMX2EXI6G76MDIQCAS7RTWAJZUPANCNFSM6AAAAAAQK4SWRU. You are receiving this because you authored the thread.Message ID: @.***>