From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id EIoaLVzBm2FOsAAAgWs5BA (envelope-from ) for ; Mon, 22 Nov 2021 17:12:12 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id KBTIKFzBm2H3FQAAB5/wlQ (envelope-from ) for ; Mon, 22 Nov 2021 16:12:12 +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 51C53D0CA for ; Mon, 22 Nov 2021 17:12:12 +0100 (CET) Received: from localhost ([::1]:40994 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mpBvO-0002fq-FL for larch@yhetil.org; Mon, 22 Nov 2021 11:12:10 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33090) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mpBuc-0002fb-Sl for emacs-orgmode@gnu.org; Mon, 22 Nov 2021 11:11:22 -0500 Received: from [2607:f8b0:4864:20::1029] (port=39528 helo=mail-pj1-x1029.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mpBub-0001qr-Dl for emacs-orgmode@gnu.org; Mon, 22 Nov 2021 11:11:22 -0500 Received: by mail-pj1-x1029.google.com with SMTP id y14-20020a17090a2b4e00b001a5824f4918so17241706pjc.4 for ; Mon, 22 Nov 2021 08:11:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=h0jqVvB1lw/r8+wKdAwyunhbO0Dr4Lvlf95hCjieFUk=; b=ovGvWx8ZkOvO0eAyMMJMhiiEEol81Ei7KesJWeky1TiaO8PUkJZra5YhDTVQ9hx99a tIi+1Z5oep07vxVhu0ETyfAIH3BxXVJsRfzeiUYIIwtsVzedQvCAChFCEEkpvcGOTWBo aHARGAjx/+fvXyINmBmP3A1J7gd1iLILjZvA/Dp2NRYIE/63utZKgYxqQDfCrFTxjmj7 eO6UgFgX0YiZb7Losv05HdgnrsKfo9B+AGZZ7/24qAcFNwxXVrSLfzyfdY/VWDRHxMR7 UYFIg+oZICOPC0zCAIX0T3bOmG/vqXt1QUOz9NLLIpunZr2uJ0WOr/CgxMzhY6EZo5oC cOog== 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:cc:subject:in-reply-to:references :date:message-id:mime-version:content-transfer-encoding; bh=h0jqVvB1lw/r8+wKdAwyunhbO0Dr4Lvlf95hCjieFUk=; b=LSJBNGZJQZHLBdGtZzKU/1aVx9agOGgZl60X97NItrus2vLQQfguOqU5MuhyrvoYfB aV2G41c4U2emhdICF/PRWoqnBlmNM0cWTMehF98dxtyGsfh7Tjq+u4jFZKF8ieLy0+aB V3zEdLcvBQmxphJwUDRU70vfrsvUEuUiyujLbKZhLa6LzH02LZbih3rfl7d+fiDI6eEw KXOPOnJhlfWS1UaSTJ+/1Bbm4KTVru2RiH1wbxszzgUs8/DA+O3ex9r67fdSqLexmXfR IZ1vdchYjbot8ie1YcEu4iac2LGn7/Iu2NRFbAdxl9xc2a4df07XDpprn25WrJldXRzT QADQ== X-Gm-Message-State: AOAM531eaDvmheJ2vlxK+F9HBA43qjy9CWxibXF2/0wpDel5OupYvRSS BWpi//hyl+uSYGMNk+bBOWyplbEC/vI= X-Google-Smtp-Source: ABdhPJyYUqEH8hEvvV15zF9QQEzFReBwfB896/PIaPrGVn5LOwnSQtPCUg5fum0Tvk/qRTgauMPHtw== X-Received: by 2002:a17:90a:c08a:: with SMTP id o10mr32530906pjs.44.1637597476926; Mon, 22 Nov 2021 08:11:16 -0800 (PST) Received: from ryzen3950 (c-208-82-98-189.rev.sailinternet.net. [208.82.98.189]) by smtp.gmail.com with ESMTPSA id d20sm4211389pfl.88.2021.11.22.08.11.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Nov 2021 08:11:16 -0800 (PST) From: Matt Huszagh To: Timothy Subject: Re: [PATCH] Fix regex for determining image width from attribute In-Reply-To: <877dd07fnb.fsf@gmail.com> References: <87czmtuy0p.fsf@gmail.com> <87ilwl71gh.fsf@gmail.com> <87a6hxuw0y.fsf@gmail.com> <877dd07fnb.fsf@gmail.com> Date: Mon, 22 Nov 2021 08:11:11 -0800 Message-ID: <8735noqig0.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::1029 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::1029; envelope-from=huszaghmatt@gmail.com; helo=mail-pj1-x1029.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=1637597532; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=h0jqVvB1lw/r8+wKdAwyunhbO0Dr4Lvlf95hCjieFUk=; b=sOs22b07GS4JGzo2fIEdgqEZiqCMdc26/oiPo6YQT5CLhh5HxlO1JUerVIL0ajEIj0iLzx XHavu18tlUNMqU/WyzBXdGr2nE+If0EqgzgvgqGjPznehx2D81YyD2Uh2IEELlsriOF+9X Z6Iz06zCWR1hQ23RaO+wsEKeslqmXlPvWIdpRkgIyxTKxPy/8qDxKgIyc48P3JwYWXfI18 Wtc9+xdfueMhdhW4RjUiJLwohlgVb60Inzu4koIrMGDKppTcHMwYe3p0VdtDNLCKEa1AAc iUuk9apxONzUym9WIdbye9CwY1gnX4gE4wEN5YTKR6iYEEO2RaiCcCftgTJyIA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1637597532; a=rsa-sha256; cv=none; b=SM2L3j/mi/b2YxsdLOseoEcddag4/3nkxbsuKhDl3ajoJC7SrR6JFVTKQbPYMd1W+1PWKf eiwapbM2Z9oyhHRqxqtFUFkr9qOwM3lrUXC2SweQeRC7DVHW2ZoBiMD1dIGnhAtgJUPVQk mHSxUzmvQdIX2XDTTj0NYyF0VMfy7P54O8kUCJW8YGOsO+PMwwK225a7s1g+P+yukII235 k6JVX7k7hHJQNIkjx8L4SKB8eBo0LjF/rAjxmtigiQyBQVWkOUVIVvxlzQ+9exEg4hGH0Q 8WCfWSKzXhfeYCFzyePnYhllV5zTQl4ke28dUTQDWLPAvhOWHNf/uWy2jsmjVA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=ovGvWx8Z; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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: -0.28 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=ovGvWx8Z; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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: 51C53D0CA X-Spam-Score: -0.28 X-Migadu-Scanner: scn0.migadu.com X-TUID: Fl+WYKC9rTGC Timothy writes: > Actually, it=E2=80=99s almost possible with the current implementation. C= onsider 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,= this > would cause the behaviour you describe. > > What do you think? Yeah, I think it's ok. To be perfectly honest, I still don't love it, but I understand now that my disagreement was with a decision made a while ago (from a quick look at the commit history, 2012 or before), not with the one you made recently. In my opinion the most logical solution would be for the width to fall back on specifically attr_org, not just any attr_ when `org-image-actual-width' is nil. To clarify further, my main disagreement is with the idea that setting attr_html (for example) implies that one wants the same setting in the org buffer. But, it seems that ship sailed a while ago and now this would be a breaking change. So, given that, I concede and I think attr_org: :width t is an acceptable compromise. Thanks for coming up with that! >> (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. Ok, thanks for clarifying. >> Maybe a solution to accomplish all goals would be to add an #+attr_fallb= ack >> (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. Yeah, I agree this is wrong. I'd misunderstood the current behavior. Matt