From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id SH0aJTNWm2FD0gAAgWs5BA (envelope-from ) for ; Mon, 22 Nov 2021 09:34:59 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id MPi2IDNWm2HmZgAAB5/wlQ (envelope-from ) for ; Mon, 22 Nov 2021 08:34:59 +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 2F4C7C8DE for ; Mon, 22 Nov 2021 09:34:59 +0100 (CET) Received: from localhost ([::1]:38142 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mp4mw-0007UV-8w for larch@yhetil.org; Mon, 22 Nov 2021 03:34:58 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42704) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mp4mN-0007Tw-T4 for emacs-orgmode@gnu.org; Mon, 22 Nov 2021 03:34:23 -0500 Received: from [2607:f8b0:4864:20::536] (port=38593 helo=mail-pg1-x536.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mp4mM-0004T8-0v for emacs-orgmode@gnu.org; Mon, 22 Nov 2021 03:34:23 -0500 Received: by mail-pg1-x536.google.com with SMTP id q12so14690795pgh.5 for ; Mon, 22 Nov 2021 00:34:21 -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=dRXOpe7kIivFCuQw/dVzBYd6U2ZPsA3qLfJb2wu4KrA=; b=Ps7P1yhHzmdbC0G6c02j42Dri0yGgWh+95h+BWh7+xzmotV5rwHzCmvwV4nYUZUwPq aPInSI6HacozLXCCpJvSpU/TfIuZHM+yWof8UiVQpkNGEEcOuS3vIIPdR7KkTRBpyffq 7LbG1LmAeL64gBUZQuyTJuphd9fWkE/EZ+do2EpB5EoZkeoeBFm+/wlLnk6AVxRhsn5H 9lY9Rntd0F/30FzKV4VP5X2tk2lA+CUluNKLPEWqJRa+jeJ5JC7WWJad3KO53vb+YLP7 8CF5vEv9spyQ2JyiSHpsUpCqcHRLPlELwmK5RpRvgJB/qEuI0IHyHzlYHc+c2A5m/VEg lYRQ== 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=dRXOpe7kIivFCuQw/dVzBYd6U2ZPsA3qLfJb2wu4KrA=; b=p2RgSkYp2yQrD8ju2Or34NpkgsQb5C53C4HJm4EfEBgWQFFkeaS4EP8KgifcUv3W+x 0RBmrAPpbMNZKlVODtJ8Dxkur8n9x90S+2xOg9kQCiimIX4AZkuUbpvJGnmbrjTH4sj+ kwd2ZyRsqr1jiY4ecqiGtp0tBf1RRiAqIBo0mDugOBhNUCvlFYJ/4g2kYcxzl9z0V01v BM9u7hekgvp1A9PI+iK8fo0phMECuTR6TD+j4xmglMfSc50lDrXv5OMGHlANLC7Sbnbt bpjrpXsJlw0dvANCXkVUjUTfUa7UaceCk7MEE8bbd8rUTmbNMcpTxU3S5FFRGFXlLXuL Mh/g== X-Gm-Message-State: AOAM533jVMuoIShynrMhKPEWqfcKJaZwYBjTT88d9aPNU5mqcx/4YYpS 8kh70I7Kf8WWe+piTbocywA= X-Google-Smtp-Source: ABdhPJyOMNf/SY9RB+Adz9AFD2RfsCVr4hxR5Pf6RvYXjm8jbENr9A0uHlVod9CHU6Mh7Ev9exWYtg== X-Received: by 2002:a05:6a00:1482:b0:49f:d9af:27dc with SMTP id v2-20020a056a00148200b0049fd9af27dcmr84451238pfu.9.1637570060253; Mon, 22 Nov 2021 00:34:20 -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 p43sm7429188pfw.4.2021.11.22.00.34.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Nov 2021 00:34:19 -0800 (PST) From: Timothy To: Matt Huszagh Subject: Re: [PATCH] Fix regex for determining image width from attribute Date: Mon, 22 Nov 2021 16:29:41 +0800 References: <87czmtuy0p.fsf@gmail.com> <87ilwl71gh.fsf@gmail.com> <87a6hxuw0y.fsf@gmail.com> User-agent: mu4e 1.6.9; emacs 28.0.50 In-reply-to: <87a6hxuw0y.fsf@gmail.com> Message-ID: <877dd07fnb.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::536 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::536; envelope-from=tecosaur@gmail.com; helo=mail-pg1-x536.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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1637570099; 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=dRXOpe7kIivFCuQw/dVzBYd6U2ZPsA3qLfJb2wu4KrA=; b=kbfB3Wov8X+ueTZ4x51yDT71bV74KNb77kao9LQgjfqHX/SonXUZyCaFf0kHR/jf0WN9XN 1hZ3Bh+TxNKL8pTeSLZO94SFYGk+lbl5lwIfcaNO6ZpePFiEhFxnHnjhPjv3AjA/wftyFy hZhcK2s9DoAIpDIhH4IpMdBD3FNQfA9oN0AdSmEOMmzD88ZLdgSQg2A4CcMR2LwfyKHpu1 z0GgmucXbTSkdspTmzi7RgakulEfZo3hhN7k+27G0Gltc6JCT6tM1gSBVh+U5XAPzOrvul ADEWrKd7aadDHCQ3VzTBzGLoSjUzbTh2+i5hJrqFJe2AyGuaKs+uURl3lHf5Tw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1637570099; a=rsa-sha256; cv=none; b=VgKylenMczu95LUJP36UP38rnsZ6b9Mi/fWzxAYIwvBkrA8GibF1DK1pRnknOJsbg5Em4I 6hyq10yPq4ufnacnf53L2Z4OJnu9udVnZTnwTx0FYuygH99yXgcyQrqgGn/BHIYrxvIPkQ vRSOQcBhlT28DgUaj3Pfwv+hzmJZUJtfPuZboAVGkjpnApgkojWssiKqi30in3yCqIXIHq EY+pXwMqAtYJbwHPhSTTd502bM4e2N5o3tQzvpG3I9Gf89irMa4jbSaMSEKwgatbe2peBt nt38BEsCgm7L1HdHO3k03gFlXas++SnKrwXukSoZxAhcFh4s3O6rjFWWaSe7Bg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Ps7P1yhH; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -1.58 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Ps7P1yhH; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 2F4C7C8DE X-Spam-Score: -1.58 X-Migadu-Scanner: scn1.migadu.com X-TUID: 3PO9iWkggg0i --=-=-= Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Matt, > Unfortunately, I think this makes a valid use case > impossible. Specifically, I like to be able to set an image width > explicitly with #+attr_org (or some other attr_ for the corresponding > export) and fall back to the actual image width when this isn=E2=80=99t > specified. This includes the ability to use the actual image width in an > org buffer, but an explicitly-set image width for export. For example, > for my blog I often have attr_html set, but I want the image to use its > actual width when displayed in org. Thanks for explaining a use case! That=E2=80=99s most helpful. > I don=E2=80=99t see how this is possible with the current implementation.= But, it > works naturally with the implementation I have in mind Actually, it=E2=80=99s almost possible with the current implementation. Con= sider this example: =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80 =E2=94=82 #+attr_org: :width t =E2=94=82 #+attr_html: :width 20% =E2=94=82 [[file:image.png]] =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80 At the moment Org tries to interpret `t' as a number (and obviously fails), however with a small tweak that I think would be very reasonable to make, t= his would cause the behaviour you describe. What do you think? > (IIRC this is how it previously worked, but I could be mistaken). You are mistaken. The previous implementation looked for `#+attr_*' too, but didn=E2=80=99t recognise proportional values. > Maybe a solution to accomplish all goals would be to add an #+attr_fallba= ck > (or attr_default, attr_any, attr_all, etc.) that is used for any backend > unless a specific setting is made for that backend. Hmmm, I=E2=80=99m not sure this is called for. All the best, Timothy --=-=-=--