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#67533: SVG images confound position pixel measurements Date: Sun, 3 Dec 2023 18:14:57 -0500 Message-ID: <2AF7C34C-FB7D-49C6-AC85-054D2DFE2E4C@gmail.com> References: <9B9C683E-B951-406E-98AA-32F4539B3FF7@gmail.com> <83o7fbb0zf.fsf@gnu.org> <6158BB83-3C05-4CEC-BF65-A6C0DEA329CD@gmail.com> <837clybds3.fsf@gnu.org> <83wmtx83io.fsf@gnu.org> <906A480A-85B4-4AB0-B2E3-1533A48C228D@gmail.com> <835y1g8z7v.fsf@gnu.org> <8334wk8kd1.fsf@gnu.org> <8672011B-4C83-4983-9DEA-43ED009042F8@gmail.com> <616C9D31-F265-4735-B73E-C0574D79F7F1@gmail.com> <83r0k3782q.fsf@gnu.org> <83jzpv707n.fsf@gnu.org> <83h6kz6yeh.fsf@gnu.org> <663EEC8D-2D83-422A-8EAA-262B2E9A4097@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.200.91.1.1\)) Content-Type: multipart/alternative; boundary="Apple-Mail=_325F228A-30B8-40A6-87ED-4C07464A0456" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29816"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 67533@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 04 00:16:11 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 1r9vh4-0007bH-QT for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 04 Dec 2023 00:16:10 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r9vgp-0001CC-4Q; Sun, 03 Dec 2023 18:15:55 -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 1r9vgm-0001C2-SF for bug-gnu-emacs@gnu.org; Sun, 03 Dec 2023 18:15: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 1r9vgm-000820-JN for bug-gnu-emacs@gnu.org; Sun, 03 Dec 2023 18:15:52 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r9vgw-0002vw-DS for bug-gnu-emacs@gnu.org; Sun, 03 Dec 2023 18:16:02 -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 23:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67533 X-GNU-PR-Package: emacs Original-Received: via spool by 67533-submit@debbugs.gnu.org id=B67533.170164532911227 (code B ref 67533); Sun, 03 Dec 2023 23:16:02 +0000 Original-Received: (at 67533) by debbugs.gnu.org; 3 Dec 2023 23:15:29 +0000 Original-Received: from localhost ([127.0.0.1]:33038 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r9vgP-0002v0-8v for submit@debbugs.gnu.org; Sun, 03 Dec 2023 18:15:29 -0500 Original-Received: from mail-io1-xd34.google.com ([2607:f8b0:4864:20::d34]:46561) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r9vgK-0002ug-Ro for 67533@debbugs.gnu.org; Sun, 03 Dec 2023 18:15:27 -0500 Original-Received: by mail-io1-xd34.google.com with SMTP id ca18e2360f4ac-7b37dbf896eso245708339f.1 for <67533@debbugs.gnu.org>; Sun, 03 Dec 2023 15:15:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701645309; x=1702250109; darn=debbugs.gnu.org; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:from:to:cc:subject:date:message-id:reply-to; bh=7C/NJFh2CAQ+8h8qHi8Mm7ECbktR/10E36xkxIO9g+g=; b=IT8qVw+/CAq3MydUv8sFCLdG6dOoxVnuvotkAGWHsMES+eyoun3Ge0zR9TER3aL3SC rZexrrpr/qzHmprxB0gglYuxzofTtWka2AtyuSDnoUKGLzxRsxk1jGqXueXZ+hgPwYLq s17dcFt7VOEKg6/BU2MuUa6CCkHeu51LUD39hfHzyITBLHAhJIqvGYU1FvHFVcVwgvgk smKjoVvF0pScUgkKsDVIWDR5KBeSMH7Q+r7mPm5F3yrS+/sUb9+uD1UKpAc2L9AAq1o9 eYUeCbLPefw0KMu83Hp1ig1hgd5yhUzlunFB4vdvTo4Dq+kR8QclMHEyqwWi5iiMLysp XM/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701645309; x=1702250109; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=7C/NJFh2CAQ+8h8qHi8Mm7ECbktR/10E36xkxIO9g+g=; b=osR8p8wFlC7desop8bTlyPO91iO6StwviNEZGUkxUVuW1H4XvPbuhSVvEoPa2hH5/I sUuh06jBP08qRzTRb8zfBDKEfRtrtyJpH3VB+fAmwWWviytBVYK2sLLrbRCMBOOYPdQk BVrNkRXP8ggd5lQNdUTqVpNG++C4gxKTkYkQD4TahMonFri3jjFBF0ifW54wp4/Nzdb4 743WQQKTVqyNfCZkINs2kGUe90zHHuKJhueVGlwhpqtR0cQvK69psLm6zV65subik7Pq YunXR/XWlOlsMWDUuS0rzfhNr+xFldD/7LFX/rZKopBvzWdND1MYWb+cWlmk4N+UP79Q kShA== X-Gm-Message-State: AOJu0Yw5/rlvy/5KEZlIELsq0fzAQGMJ6mhJhrA3X0OHYIQv52Ya3Xb6 0Hucxz4xp03mOXDBoDvOJGQ= X-Google-Smtp-Source: AGHT+IFGZiX3dwkvUlIm0iS5DP5OqlG7DjGfV1sjAiZsXtUxpYqVpCauxgd5vDe3Dtludtt5PpF0KQ== X-Received: by 2002:a5d:8709:0:b0:7b3:e5d1:9e0c with SMTP id u9-20020a5d8709000000b007b3e5d19e0cmr4690251iom.0.1701645308838; Sun, 03 Dec 2023 15:15:08 -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 p24-20020a02b898000000b0046651cf4d98sm2217708jam.78.2023.12.03.15.15.07 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 03 Dec 2023 15:15:08 -0800 (PST) In-Reply-To: <663EEC8D-2D83-422A-8EAA-262B2E9A4097@gmail.com> X-Mailer: Apple Mail (2.3774.200.91.1.1) 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:275461 Archived-At: --Apple-Mail=_325F228A-30B8-40A6-87ED-4C07464A0456 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 This has something to do with org-indent or the org-element-cache. So = this may be a =E2=80=9Crevealed bug=E2=80=9D in that code, which was = perhaps relying on some flaw in movement around larger images. =20 I don=E2=80=99t think there=E2=80=99s an urgent need to revert; I=E2=80=99= ll bring this to the org folk=E2=80=99s attention. > On Dec 3, 2023, at 4:25=E2=80=AFPM, JD Smith = wrote: >=20 > I=E2=80=99m sorry to report that this fix seems to have introduced a = hard lockup in org-display-inline-images, when displaying images in an = org file with larger images. =20 >=20 > I just confirmed by reverting to the state just before your patch was = applied to master. It may have something to do with the final large = image fix. >=20 >> On Dec 3, 2023, at 11:31=E2=80=AFAM, Eli Zaretskii = wrote: >>=20 >>> Cc: 67533@debbugs.gnu.org >>> Date: Sun, 03 Dec 2023 17:52:12 +0200 >>> From: Eli Zaretskii >>>=20 >>>> From: JD Smith >>>> Date: Sun, 3 Dec 2023 10:48:20 -0500 >>>> Cc: 67533@debbugs.gnu.org >>>>=20 >>>>> The cumulative patch below should fix all the problems you threw = on me >>>>> till now. >>>>=20 >>>> Most excellent, thank you for the sleuthing Eli! Your roll-up = patch applies cleanly and fixes all the pixel size related issues in my = large complex org-with-latex-preview file. I can induce the same = behavior in my original svg-generating code by bumping the default width = up to: >>>>=20 >>>> (w (+ 142 (* 2 (round (expt (1+ r) 1.25))))) >>>>=20 >>>> and it solves it there too. (I=E2=80=99ve updated the gist to do = this, and included the final function below, for posterity). >>>=20 >>> Thanks, I will install the changes (on master) soon. >>=20 >> Now done. >>=20 >> Is there anything else to do here, or can we close this bug? >>=20 >> Thanks. >=20 --Apple-Mail=_325F228A-30B8-40A6-87ED-4C07464A0456 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 <conjecture>
This has something to do with = org-indent or the org-element-cache.  So this may be a =E2=80=9Crevea= led bug=E2=80=9D in that code, which was perhaps relying on some flaw in = movement around larger images. =  
</conjecture>

I don=E2=80=99= t think there=E2=80=99s an urgent need to revert; I=E2=80=99ll bring = this to the org folk=E2=80=99s attention.

On Dec 3, 2023, at 4:25=E2=80=AFPM, JD Smith = <jdtsmith@gmail.com> wrote:

I=E2=80=99m sorry to report that this fix seems to = have introduced a hard lockup in org-display-inline-images, when = displaying images in an org file with larger images. =  

I just confirmed by reverting to the state = just before your patch was applied to master.  It may have = something to do with the final large image fix.

On Dec 3, 2023, at 11:31=E2=80=AFAM, Eli Zaretskii = <eliz@gnu.org> wrote:

Cc: 67533@debbugs.gnu.org
Date: Sun, 03 Dec = 2023 17:52:12 +0200
From: Eli Zaretskii = <eliz@gnu.org>

From: JD Smith = <jdtsmith@gmail.com>
Date: Sun, 3 Dec 2023 10:48:20 = -0500
Cc: 67533@debbugs.gnu.org

The = cumulative patch below should fix all the problems you threw on = me
till now.

Most excellent, thank you for the = sleuthing Eli!  Your roll-up patch applies cleanly and fixes all = the pixel size related issues in my large complex org-with-latex-preview = file.  I can induce the same behavior in my original svg-generating = code by bumping the default width up = to:

     (w (+ 142 (* 2 (round (expt (1+ = r) 1.25)))))

and it solves it there too. (I=E2=80=99ve updated = the gist to do this, and included the final function below, for = posterity).

Thanks, I will install the changes (on = master) soon.

Now = done.

Is there anything else = to do here, or can we close this bug?

Thanks.

=

= --Apple-Mail=_325F228A-30B8-40A6-87ED-4C07464A0456--