From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: JD Smith Newsgroups: gmane.emacs.bugs Subject: bug#67604: Motion problems with inline images Date: Sun, 3 Dec 2023 11:54:27 -0500 Message-ID: Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.200.91.1.1\)) Content-Type: multipart/alternative; boundary="Apple-Mail=_39C1DB35-AFB5-4EFF-95F9-5D48263C16AA" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14954"; mail-complaints-to="usenet@ciao.gmane.io" To: 67604@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 03 17:56:05 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1r9plD-0003eb-WA for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 03 Dec 2023 17:56:04 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r9pl5-0008Rj-Io; Sun, 03 Dec 2023 11:55:56 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r9pl1-0008RW-WB for bug-gnu-emacs@gnu.org; Sun, 03 Dec 2023 11:55:52 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r9pl1-0002d8-OA for bug-gnu-emacs@gnu.org; Sun, 03 Dec 2023 11:55:51 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r9plB-0006K2-O7 for bug-gnu-emacs@gnu.org; Sun, 03 Dec 2023 11:56:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: JD Smith Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 03 Dec 2023 16:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 67604 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.170162250724227 (code B ref -1); Sun, 03 Dec 2023 16:56:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 3 Dec 2023 16:55:07 +0000 Original-Received: from localhost ([127.0.0.1]:60720 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r9pkD-0006II-Rl for submit@debbugs.gnu.org; Sun, 03 Dec 2023 11:55:06 -0500 Original-Received: from lists.gnu.org ([2001:470:142::17]:46288) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r9pkB-0006I4-SS for submit@debbugs.gnu.org; Sun, 03 Dec 2023 11:55:01 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r9pjw-0008Nu-FH for bug-gnu-emacs@gnu.org; Sun, 03 Dec 2023 11:54:44 -0500 Original-Received: from mail-io1-xd2e.google.com ([2607:f8b0:4864:20::d2e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r9pju-0002LL-JO for bug-gnu-emacs@gnu.org; Sun, 03 Dec 2023 11:54:44 -0500 Original-Received: by mail-io1-xd2e.google.com with SMTP id ca18e2360f4ac-7b3905b1b86so226970639f.3 for ; Sun, 03 Dec 2023 08:54:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701622480; x=1702227280; darn=gnu.org; h=to:date:message-id:subject:mime-version:from:from:to:cc:subject :date:message-id:reply-to; bh=PJxmt41Oy/jqX8BWA9FD+X8vaRJQ9PV+2oezOncQnrA=; b=facRJfKpLVLpJXN1fO84930X+Ys60ztgvwXhmRgNtbgAYkR2AUcajfAKiLm8Of8j1t Z/fVSMvvDTaVWK8Mz4DFNufzbaoRk3HHNkuNl3IVrkMM6uZ48CZ3Wtj3XOfISux7xBRE H4bS+EAP5CxZEYvJ2gLlBiSSScKAmSeOQRXkqVejSlpCd38KmGouxHLUAmGVyHj1qM5+ nIrdVxnxeK4fE131izNz2ZJ6pciFTZ2beAdoI+AIIAIaVsYUR9uSuV2KYcUCAnllBx4X YwagJ09DFD3+6sTAFOEUjOTEEeXhKYXv0xFnbm9xH7qqg7NP53cDv49gUaInDSStQsFj Q1uA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701622480; x=1702227280; h=to:date:message-id:subject:mime-version:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=PJxmt41Oy/jqX8BWA9FD+X8vaRJQ9PV+2oezOncQnrA=; b=rlZ8DJoYTRUw7BsaRVReNfqpq8QKCL54p5/+ikF50n3Mrs4gr2Vp/CTmUgr2pt9m7P u+Dg4HXekZReI0unW92wnghiPEsM/IcyBy9iOK3ocJQLXX1NzNMAR8n8obLSFEAl5w2I Cq+6njbDogz8mJvK4G6P9o/3K/02lRQkZgwLzlhh+OycGlB4r2fDDA6nq35B0SDbzoXj 4BdmdYMg+o9flXYMXJScLfXrInVRRg4yVUJnf7X9pIjXKmuwSs1kDrsgM6+89LaEfeU3 UgBKgXkFXZOHfa6xAIMDDFeMkrC2mzEKCSMb3SwuZxZBWW2hSJWhqBekFV4VzMOldQPB lQ2g== X-Gm-Message-State: AOJu0YzaLPlW8hzs2XSqmalUB7eYq6pBXasTTcU8Lj3xK3yqValu95jV 6VtP6ha29U4liz5PiyydBZHRGGKHFxw= X-Google-Smtp-Source: AGHT+IH0A8CUj+eVrAN+M6yvpmA8ySXaPZ1Us1Od8cEF+6Nm0m0EPpIizIHekC9d/Qum1F2sdG1eaQ== X-Received: by 2002:a5e:8f45:0:b0:7b4:435e:2f66 with SMTP id x5-20020a5e8f45000000b007b4435e2f66mr992713iop.42.1701622479686; Sun, 03 Dec 2023 08:54:39 -0800 (PST) Original-Received: from smtpclient.apple (cm-24-53-187-34.buckeyecom.net. [24.53.187.34]) by smtp.gmail.com with ESMTPSA id n8-20020a5e8c08000000b007b4032a51ecsm2271761ioj.8.2023.12.03.08.54.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 03 Dec 2023 08:54:38 -0800 (PST) X-Mailer: Apple Mail (2.3774.200.91.1.1) Received-SPF: pass client-ip=2607:f8b0:4864:20::d2e; envelope-from=jdtsmith@gmail.com; helo=mail-io1-xd2e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:275431 Archived-At: --Apple-Mail=_39C1DB35-AFB5-4EFF-95F9-5D48263C16AA Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 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 = 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 =E2=80=9CJUMPS HERE=E2=80=9D= 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. ++++=20 (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) =3D = \\log\\left(\\sqrt{\\tan(t)}\\right)$ Donec hendrerit tempor tellus. = $\\chi(y) =3D \\sqrt{\\frac{1}{\\log(y)}}$ Phasellus lacus. $\\tau(t) = =3D \\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)) ++++ --Apple-Mail=_39C1DB35-AFB5-4EFF-95F9-5D48263C16AA Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 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 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 =E2=80=9CJUMPS HERE=E2=80=9D 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) =3D \\log\\left(\\sqrt{\\tan(t)}\\right)$  Donec = hendrerit tempor tellus.  $\\chi(y) =3D = \\sqrt{\\frac{1}{\\log(y)}}$  Phasellus lacus.  $\\tau(t) =3D = \\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))
++++

= --Apple-Mail=_39C1DB35-AFB5-4EFF-95F9-5D48263C16AA--