GNU bug report logs -
#67604
Motion problems with inline images
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Sat, 07 Jun 2025 15:40:42 +0300
with message-id <86wm9nhghh.fsf <at> gnu.org>
and subject line Re: bug#67604: Motion problems with inline images
has caused the debbugs.gnu.org bug report #67604,
regarding Motion problems with inline images
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
67604: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=67604
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
[Message part 3 (text/plain, inline)]
Following on from the recently fixed bug#67533, which related to incorrect pixel size measurements with inline images, one remaining issue, with that fix in place, relates to motion in buffers in visual line mode with inline images. A video of the effect <https://gist.github.com/jdtsmith/ad765047a6afe20f353de573d8c07da9?permalink_comment_id=4780726#gistcomment-4780726> can be seen on the associated gist for bug#67533.
Here the issue is that next-line/forward-line/(vertical-motion 1) all skip from the Green inline SVG straight to the “JUMPS HERE” line, for certain frame widths (for me: 79 characters). See reproduction code, below. Depending on your font char size (mine is 7x14 pixels) this width may vary for you. Note that multiple frame width produce the exact same wrapped appearance, but the motion bug shows up only for one of them.
There are other related phenomena, such as prev-line from an image at column 0 jumping to (near the) end of the previous screen line, but hopefully this is enough to identify the motion issue(s) at hand.
++++
(require 'svg)
(let ((buf "svg-file-motion-demo")
(ims '(("red" 146 29)
("green" 106 29)
("blue" 151 29))))
(with-current-buffer (get-buffer-create buf)
(erase-buffer)
(visual-line-mode 1)
(insert "tellus. $\\gamma(t) = \\log\\left(\\sqrt{\\tan(t)}\\right)$ Donec hendrerit tempor tellus. $\\chi(y) = \\sqrt{\\frac{1}{\\log(y)}}$ Phasellus lacus. $\\tau(t) = \\exp\\left(\\sqrt{\\exp(t)}\\right)$ Curabitur lacinia pulvinar nibh.
JUMPS HERE")
(goto-char (point-min))
(while (re-search-forward (rx ?$ (* (not ?$)) ?$) nil t)
(let* ((ov (make-overlay (match-beginning 0) (match-end 0)))
(im (pop ims))
(svg (svg-create (nth 1 im) (nth 2 im))))
(svg-rectangle svg 0 0 (nth 1 im) (nth 2 im) :fill-color (car im))
(overlay-put ov 'display (svg-image svg :ascent 'center)))))
(pop-to-buffer buf))
++++
[Message part 4 (text/html, inline)]
[Message part 5 (message/rfc822, inline)]
> From: JD Smith <jdtsmith <at> gmail.com>
> Date: Sat, 7 Jun 2025 08:01:17 -0400
> Cc: 67604 <at> debbugs.gnu.org
>
>
> > Thanks, I've now installed this in your name on the master branch.
> >
> > Is there anything else to do here, or should this bug now be closed?
>
> Thanks. Nothing else, it can be closed.
Done. Thanks for all your hard work and for persevering.
This bug report was last modified 10 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.