From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id eHPwMijrpmGyOAEAgWs5BA (envelope-from ) for ; Wed, 01 Dec 2021 04:25:28 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id sBumLijrpmHMRgAAbx9fmQ (envelope-from ) for ; Wed, 01 Dec 2021 03:25:28 +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 49E3E18DA6 for ; Wed, 1 Dec 2021 04:25:28 +0100 (CET) Received: from localhost ([::1]:45218 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1msGFL-0007m1-2J for larch@yhetil.org; Tue, 30 Nov 2021 22:25:27 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52176) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msGEk-0007lp-1T for emacs-orgmode@gnu.org; Tue, 30 Nov 2021 22:24:50 -0500 Received: from [2607:f8b0:4864:20::435] (port=41947 helo=mail-pf1-x435.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1msGEh-0005m5-Sp for emacs-orgmode@gnu.org; Tue, 30 Nov 2021 22:24:49 -0500 Received: by mail-pf1-x435.google.com with SMTP id g19so22838069pfb.8 for ; Tue, 30 Nov 2021 19:24:44 -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=Hi16lL5fPd/jaWBaeUk5yi72uWaamUv+fpC/jE+YGEo=; b=d0eZ83pfHWi3Mk4VXvQA8HR8Cxu1bL7fsCcvKaX9F2UIENawIspe1VUg6sKTHUcUPa M/cwcHMSuniF8WU+TMlv5dU8DSqaa9yCEaFRlsfvtYeqp3zyHNNVDtxYD+JX/hVYILnl NsKY8u1QvNcTmIREOzbV1NdeLz4gyWydkW+4RPSIv45+bSiIfBgHEYwshBb8DoeYaqgK EgSsA44qaJ/2lQqanaVsfUcFhL7PI4P4LFoP8Bfyr5fSOQ2a09KWCwCyy98OJp+nbYdw LIUT/X1V5QU2bBs7It8trWrL0N5QaLmL9FHNO4Zw+kSUfeXaXEsP1gTQfT4RVR+CkXSG X85g== 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=Hi16lL5fPd/jaWBaeUk5yi72uWaamUv+fpC/jE+YGEo=; b=vp4sF1ic3h9lBF5Nati0FLayf78sqHU2V4reYVbQvxCt6lCydNHQeG6wQvK1kDIhL4 CPbzqCp19+9FVG0NfBT08uEKojfCw0wPDfyzOIjddi3LgjmIYi2rXdy8NM7JRSYC3Qec fcEsYut4SxlgPYC5plRE7PSHxW7i4mzLtztSyskXSKjjwWWY52HOIeQfWONhZQhW2Ez5 AB2L/a/hLpq2kxNOnPssSDUkNB4M4/4z2uQzAbChpYoDFbi3mZfKK4GF7nflcvuh9wLx fkGIIanU6yiuuZij1AvEtQVkyc2X+MdqsbUNJIpChs4bAb43T2L4prBXuNYYqafvaDSg sESQ== X-Gm-Message-State: AOAM530jQohzaHKv5F4rJ6cAeempsNWzTFVOJX7N+ECMHBfMv96i1RLf SOVz99/ptMX0WkFOWeT1LLB2iDy8pEM= X-Google-Smtp-Source: ABdhPJwUJrBc09l+7GIVL/UiSULq2oKcx6VJp7SmilRHZSh4Cugz8SZwckn+bBjpnr1ih3SitZYtAg== X-Received: by 2002:a62:7c4b:0:b0:494:66ab:ae0a with SMTP id x72-20020a627c4b000000b0049466abae0amr3277426pfc.18.1638329083660; Tue, 30 Nov 2021 19:24:43 -0800 (PST) Received: from ryzen3950 (c-208-82-98-189.rev.sailinternet.net. [208.82.98.189]) by smtp.gmail.com with ESMTPSA id pc10sm4518684pjb.9.2021.11.30.19.24.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Nov 2021 19:24:43 -0800 (PST) From: Matt Huszagh To: Timothy Subject: Re: [PATCH] Fix regex for determining image width from attribute In-Reply-To: <87k0grk0ge.fsf@gmail.com> References: <87czmtuy0p.fsf@gmail.com> <87ilwl71gh.fsf@gmail.com> <87a6hxuw0y.fsf@gmail.com> <877dd07fnb.fsf@gmail.com> <8735noqig0.fsf@gmail.com> <87wnl05ag6.fsf@gmail.com> <87y25fq5d2.fsf@gmail.com> <8735nnlaef.fsf@gmail.com> <87v90jph1w.fsf@gmail.com> <871r37l96a.fsf@gmail.com> <87k0gzpb5s.fsf@gmail.com> <87h7c2pb6w.fsf@gmail.com> <87ee75pmsn.fsf@gmail.com> <87czmjajyx.fsf@gmail.com> <87k0grk0ge.fsf@gmail.com> Date: Tue, 30 Nov 2021 19:24:42 -0800 Message-ID: <87ee6x3t39.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::435 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::435; envelope-from=huszaghmatt@gmail.com; helo=mail-pf1-x435.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: , Max Nikulin , 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=1638329128; 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=Hi16lL5fPd/jaWBaeUk5yi72uWaamUv+fpC/jE+YGEo=; b=M21VRDOwGyUNWYfxzzPIgGu4ApqqnleDQFDr08BPvXZLrAmjYR0Bnhrzy9U+wzzAbnQPGG rQQCqvaTGjB9LQi7l0WbsgO737f9YKl4wVuvtrtz9dr+m/JWnuNxqr5Dwp+QXeOi+3Bl1m JT3+5T5NCgxJcq1bLJzh2PoA/ZeqmI8AhrYHpGFUbEUjd2Jme/ROJex6v+UbrPE+2gLUBO eFO7o1E5Tj9JhngLZxICGuVXx2X7qE6ed/sucsjthQMxcSXRdwsWDWCSqdlSey1eTiUQ2+ iBqEMqFcUFPSBmgM3nfUpcrsh0iEB1ufj+5M63ol0fKhXY3kfQMKvLsiQ40GqA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1638329128; a=rsa-sha256; cv=none; b=tI/oKvne5O6psJWCEQfCeYuJNhlU0Vt2899CRMcrPhre7LjmBHMfKOB5L4K3u1tnDXH44V YyHz3hJ2qlDFVwGfl4HAnNH1u5nIqqFl6Ls7PRRgqFQW5zhME/bmBqmzGP471bAx+aMLb+ 6bXt5LmDH7hDs/CA9HFZ0oQfcAaijwELTXcJ5rsc43YjieK/TUcxM4TRStL+ewHopwa19b SX6kxU2Ox02HfZvMlG22/Nb2zyBOJR+9R7PEwbqbM0p6S+iUC+WMbFwMHaHx9olVCkAf/L reQhQQi4ssKuaVxxcTbTaFOD/u8DSUt+WrjFPwQk3QvavKVO1xSyjWWaW+ivFg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=d0eZ83pf; 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: -1.81 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=d0eZ83pf; 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: 49E3E18DA6 X-Spam-Score: -1.81 X-Migadu-Scanner: scn0.migadu.com X-TUID: 2pwEE8QD+OiD Timothy writes: > What would be a more sensible interpretation in your mind? The =E2=80=9Ct= rue=E2=80=9D value > depends on the number of columns, and fetching that information seems a b= it > unreasonable. Since this isn=E2=80=99t just used if nothing else if given= , I see a 120% > interpretation as fairly reasonable. I think there are several different questions/considerations here, which I'll address in a second. But first, I think the essential disagreement is whether org should take an action if not explicitly told to do so. I think org should only perform some action if given a clear directive. In this context, I feel that org is guessing what the user wants and taking an action based on that guess. Ok, back to the fact that there are multiple considerations here. The first issue is whether specifying a width for a backend reflects an intention to have that same width in the org buffer. As I previously stated, I don't agree that one implies the other. But, as also previously discussed, this was a decision that was made almost 10 years ago, so changing it would be a breaking change, etc. Because of that, I'm not totally sure what org should do, and I expect a lot of people won't want to change this. The other consideration is if we take the first point as a given (that org should use width directives for other backends), should it also attempt to interpret directives that are ambiguous? In this case, do we interpret 1.2\somemacro as 1.2? If \somemacro could only be \linewidth, I'd be inclined to agree that this is logical. I also understand the case for \columnwidth, though this is slightly less clear. But, what if someone used 1.2\columnsep? Seems a bit unusual I know, but maybe someone would want this. Again, I don't think we should guess if there's a chance we could be wrong. I totally agree with you that we don't want to implement a pseudo latex parser here. But I feel like all this complexity is easily resolved by just requiring that people be explicit about their intentions (i.e., specify #+attr_org: :width). That would avoid all the complex behavior and surprises that could result from making intelligent guesses about what the user wants. Anyway, let me know what you want in terms of the patch. I still think prioritizing attr_org should be its own patch and changing the regex and all the other behavior should be a separate issue. But, if you'd like me to perform the change I mentioned in my last email, I can take the time to write that up and include it in the same patch. Thanks Matt