From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id UDibLIKemmFSCwEAgWs5BA (envelope-from ) for ; Sun, 21 Nov 2021 20:31:14 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id NrxZKIKemmHjRgAA1q6Kng (envelope-from ) for ; Sun, 21 Nov 2021 19:31:14 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 6054CCAF8 for ; Sun, 21 Nov 2021 20:31:14 +0100 (CET) Received: from localhost ([::1]:48888 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mosYS-0004zu-Kb for larch@yhetil.org; Sun, 21 Nov 2021 14:31:12 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55062) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mosW2-0003YT-3f for emacs-orgmode@gnu.org; Sun, 21 Nov 2021 14:28:42 -0500 Received: from [2607:f8b0:4864:20::632] (port=34660 helo=mail-pl1-x632.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mosVz-0004Wf-4x for emacs-orgmode@gnu.org; Sun, 21 Nov 2021 14:28:41 -0500 Received: by mail-pl1-x632.google.com with SMTP id y8so12273239plg.1 for ; Sun, 21 Nov 2021 11:28:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:references:user-agent:in-reply-to :message-id:mime-version; bh=EwKJiZyniGK1qoFs7dJi8jTnUvRgln9wgiCghqlyWJo=; b=i1lrdiiu0TEo2Yx3jpZq+lwmWz3/AmpF+0eLOEP9/jTrDcitwebJ/WMr6dZBPRiBuA aNedvn0zcW01sL7/QN3YXA/gRBrLuwPO/hBdPG2REyvnz9RmyDvqXVDOwSqZzcptvXvu AfXdLKm9rAwpArf55qEsQ1JEq1QvNzSILOx1EDFY6jeuv+GWvpbAYBEwWPxBlYHAElKx A79nKU1/yUO718Wwqq5RyV6VLqNaDuNukwkJWpK8huxhhxxtmI4SnRira3EdgASEzjdw P0SmBs/P6qcrMmdv77Lh+wWOf3ZNZso4rP/652gTkbFXZC8QIcPEiD7v/4CStcUMqdSY UHng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:references:user-agent :in-reply-to:message-id:mime-version; bh=EwKJiZyniGK1qoFs7dJi8jTnUvRgln9wgiCghqlyWJo=; b=P9kNqeP2QvifmYnv+ZE0L9G3t4VpEcR1N/L+sp5hK0vNWpiU8oZjuxkRFuOqXPJ/re J4VRR8PHKcEdk5+1LfQfz5fAwUNH6kD3TrSLx2Dheh1JjSiMcKtRcXfSTFLsQtVLHnPj SQQrYjS44CGEy4qYhUh85aLilp/3BYFLrJdaebNdExB45DPZk3DIaH8gUcM7l3kvAZdH KS1HMYWi6ePui4yZmf2DtUeB8gCfizXpkj2nlNyd6b2xbV8iN7q1pSf4DveLdnS2HhWe 8VlU/sVv3RvJvjQghqPMQGfvpj0MSukTCtaUSm8WwyDy5hnC0ZLx3/P3HK/7v+f2c5GW Xqrw== X-Gm-Message-State: AOAM5309DrJf4Bazpo0hat7EkLfIz3FXGPg+JIQ1sj3Fm5ECoRNN5quV 6VD5hBj4jaG+MtOfkHVK14A= X-Google-Smtp-Source: ABdhPJy9wEyD9udXPe7th4FKgZF7sO6m/1j+S2fNQSJMWeU/hMMN47eMn5JDMLsYnzfqHuhSOZdU9A== X-Received: by 2002:a17:90b:1e0c:: with SMTP id pg12mr23772179pjb.135.1637522914413; Sun, 21 Nov 2021 11:28:34 -0800 (PST) Received: from localhost (61-245-128-160.3df580.per.nbn.aussiebb.net. [61.245.128.160]) by smtp.gmail.com with ESMTPSA id y18sm4223633pgh.18.2021.11.21.11.28.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Nov 2021 11:28:33 -0800 (PST) From: Timothy To: Matt Huszagh Subject: Re: [PATCH] Fix regex for determining image width from attribute Date: Mon, 22 Nov 2021 03:20:36 +0800 References: <87czmtuy0p.fsf@gmail.com> User-agent: mu4e 1.6.9; emacs 28.0.50 In-reply-to: <87czmtuy0p.fsf@gmail.com> Message-ID: <87ilwl71gh.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::632 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::632; envelope-from=tecosaur@gmail.com; helo=mail-pl1-x632.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1637523074; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=EwKJiZyniGK1qoFs7dJi8jTnUvRgln9wgiCghqlyWJo=; b=ho3pZl2VQcaMmjIwWCDdetnG+h9OAy8/mdimv7+imZ5za8DfwVllf7ohGdRt5I7pxHwHP6 b0p0TNP8OWv/yTOKQJbW9LjpYVeKTsBa5Mu1kvpRfxGBoQRxM22EfWTSqYRe1ZsJFgTMpa R/Wgo6aaYFEqGi4xji9MIYfm08XLT0hXQbenhXzr24IS78IjGUSObObeSvQBJL8YijzKOX BB7ocZuo0aoSg9Nq2CxF/pI7ffXtyDKkPKs4Ez6oIRMxXQ9FhVpyI+38G0WbzP2s+rlzt/ biyLy0nugbKiK0iPHx/EUN+h4QllzhMmnFIISKW5OC1sOXo7oaxQQn8mg2ejxg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1637523074; a=rsa-sha256; cv=none; b=Gs6KOvkN8mxF0gQ9ftFuWOVLr3oB9Fs6IFP3xGBVQRsuxemDQxIJvTcZM5UWfrvyW400fc QbuFuMBBgbjU/6rGlNKueYSmGjJWM8GNTCDZcbXWy4d4iZRThbniEC24fFJpZacSkrVAOR 2M/hDftaVKUtzM3xvn8dRGc2wY+xZKzVkAIjRgVFh67NqcL2h+ubn2Qf+F727OIJnNrbTY Pbv63JrOwNJxWVA4cyenl7PKjQ9eu6VOxTCx3+LlNfwpxpwphcTyx4u8R2ZE4DXZ6cF6lb ZuVZMyJOzqYca3gDiywmsEn/Bw1r62JFhMeSPTUhq9symWJWkjGV7dPjQBThBQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=i1lrdiiu; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.08 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=i1lrdiiu; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 6054CCAF8 X-Spam-Score: -3.08 X-Migadu-Scanner: scn0.migadu.com X-TUID: RW6njCsIRS8X --=-=-= Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Matt, > A recent patch started computing the inline image width from any attr_ > line. This is incorrect, as it matches settings like attr_latex, or > attr_html. We only want to look for settings specifically for the org > buffer. This patch fixes that. Once again, thank you for the patch. The fact that the current regexp match= es `#+attr_latex' and `#+attr_html' is in fact by design though*. This is beca= use I consider it safe to assume that a `#+attr_*' which gives non-integer width = between 0 and 2 can be safely assumed to be that proportion of the page width. e.g. `#+attr_latex: :width 0.7\linewidth' or `#+attr_html: :width 70%'. This way, a good guess can be made without having do have both an `#+attr_latex/html' /and/ an `#+attr_org' line for the width. Should this a= ssumption be incorrect, a subsequent `#+attr_org' line will override the other `#+att= r_*'. Should there be edge-cases where this assumption doesn=E2=80=99t hold, I=E2= =80=99d be interested in patches that improves the logic here. As long as this holds more often t= han not though, this should be a net positive for user experience as I see it. Do please let me know if there are any good examples of unintended / counter-intuitive behaviour you=E2=80=99re aware of. All the best, Timothy * Well, it=E2=80=99s worked this way for a while, and I made a deliberate c= hoice to keep this behaviour when expanding the width to recognise proportional values. --=-=-=--