From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 0ETlKOV7qWFYVgAAgWs5BA (envelope-from ) for ; Fri, 03 Dec 2021 03:07:33 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id IDh5JOV7qWG4RgAAbx9fmQ (envelope-from ) for ; Fri, 03 Dec 2021 02:07:33 +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 2744F2F91F for ; Fri, 3 Dec 2021 03:07:33 +0100 (CET) Received: from localhost ([::1]:59132 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1msxz2-0006Ni-9H for larch@yhetil.org; Thu, 02 Dec 2021 21:07:32 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58294) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msxxz-0006Na-3Y for emacs-orgmode@gnu.org; Thu, 02 Dec 2021 21:06:27 -0500 Received: from [2607:f8b0:4864:20::530] (port=43842 helo=mail-pg1-x530.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1msxxx-0003Cj-JL for emacs-orgmode@gnu.org; Thu, 02 Dec 2021 21:06:26 -0500 Received: by mail-pg1-x530.google.com with SMTP id q16so1528884pgq.10 for ; Thu, 02 Dec 2021 18:06:24 -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=XJQqZ/nO1D38YKTXu5N4O0tA5j+Sxd33mFzW+x0qfw0=; b=bReYjuu5p0N3KKie13cF5r+JoL7C4KL8rUOwk3r2uS8NI6dy3kwJ0vOFFkwsVXFiBc PoY1cKyCM25gE4cDUqEP8Eb7PY1FU50tLUyq5updqqzvNmf4ORyga/K2JlkTi4N3X52M Lm6kowcTQrnou2FxNNsKZZiEd/wI+Mi4r0FWJe+MXeCubLwkOQBbAqSLXMqGihw7KTi1 O8qfmq5vPhHS/Xu7GCLSkNW5eamjLza0yCV6JNssPBHi9axxCNT2sjIHWThFPZ3pdjpZ t3BtFgEvH++VYXP6/Lt6jymsbQRKIpkY6/1E+x0e+iNUWuAzBzfhXebWzlXqNKgLz3ep w0Qg== 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=XJQqZ/nO1D38YKTXu5N4O0tA5j+Sxd33mFzW+x0qfw0=; b=CSs1jRcec/gF/I08m+yZB9GuauyEqvsQdOjdUQ0dbK1eom48MpNW1u00sbPxWGNGn9 2MsvtndbkShd3Mnc8CnY8AyjE86fi6+HtwUwUWIkvRYzsUoJpj1MGbOBGgwf/vnUz/b0 oVzma1wbW+xX0bp6wR3syayJEC7zXqfx2kxD+T8ZJLFuVndSxU2dxP4b4CXX9cTz9T/z rQQ73H4l97K8t3PWDQmQKieqpmaAbkd3FINLlDV3eCvOf1acXNCOE2NQ4FW5C4McFua8 NxkIQbzrP+f63ZFQUmtBNuLFF8NdvhmETlrcLonVD/6jSlToCc7l+l/eYCTc7e8PCrTA Qwng== X-Gm-Message-State: AOAM532Nf8IgEsKJdlvAAlWM26JIisBCoXGqeZ6QF7aKT6nUOoo9wTc7 h/Z1d509j5JgHbLHIisy4OSxlvxeJnA= X-Google-Smtp-Source: ABdhPJxO6WKxh5107Xrtgb0aiyhBW2jZhkLSIQaOuBNCP/aguuBjnBxphVSCNuEP8KScuNnCbveAKw== X-Received: by 2002:a63:80c8:: with SMTP id j191mr2371060pgd.143.1638497183623; Thu, 02 Dec 2021 18:06:23 -0800 (PST) Received: from ryzen3950 (c-208-82-98-189.rev.sailinternet.net. [208.82.98.189]) by smtp.gmail.com with ESMTPSA id j1sm1080814pfu.47.2021.12.02.18.06.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Dec 2021 18:06:22 -0800 (PST) From: Matt Huszagh To: Timothy Subject: Re: [PATCH] Fix regex for determining image width from attribute In-Reply-To: <87zgpkq5a5.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> <87ee6x3t39.fsf@gmail.com> <87zgpkq5a5.fsf@gmail.com> Date: Thu, 02 Dec 2021 18:06:16 -0800 Message-ID: <871r2ucuhz.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::530 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::530; envelope-from=huszaghmatt@gmail.com; helo=mail-pg1-x530.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=1638497253; 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=XJQqZ/nO1D38YKTXu5N4O0tA5j+Sxd33mFzW+x0qfw0=; b=q8y/oFK0IXdpRQEH107BiNijt8ETUcSesPvNQRtqovVUq1Qa1Kxvg7PrH664AzHkvgEz8G h7+q9WcbfdMzsNyB4iTc4ks9QPeTmH52ZxbfefpmOVhnOpTLgNhiM9AGh0z+2q+gDsRqfV LeNcd3ng8EXLb7XWlU0W6Za5yzYXevMKRAtRtFwlyC1HdWFcyuml+TCzywlqmYiWdMwPbp 5ekZnB5HEkE59JA8BfzBHC32ci0JWPxsOI6X+UNCCDghVvXxSj1q7DPkY1Pki/FZbocXZn V79JBTBNcgLaIuyzSJfJPFTEvwGsNrPnk0weyYNt6l2zfRCrZUUPNFyz07ByQQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1638497253; a=rsa-sha256; cv=none; b=EvO54ZbnBIo9MLqZsF020/L1/JEAz+nqCl5gTahb2EqABQPOICAHkm9YqiTh5L2e8i26/+ ua8mDlLH8d/FAixsu0BsSLy7mx2pXNGp6rOeduBKOCRP6lhcsA9kxresSmCxMEkCAn8/ia QCmTx4wNdFNsoRi8MKOlc/pFQnqOjdaAHUlNrt4SLMMRUUUYdWgNSWwTqQLFDcDw7kXNfV 69Xg9FVg66gmt23LQchVJvPtvEHPRo3mByrxwZx9lHfNjLr1GhisPwvrgayXBjUDvPjm1u 0LhWstR8SRgpOdx3VfR1MV8WKujaPShUGqz0Grltp4Vt+CollHk2cY9qRgpvSw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=bReYjuu5; 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.82 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=bReYjuu5; 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: 2744F2F91F X-Spam-Score: -1.82 X-Migadu-Scanner: scn0.migadu.com X-TUID: n1rgmAsQV2Bm Timothy writes: > Thanks for your thoughtful deliberation on this. No worries, and thanks for continuing to engage with it. >> 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 as 1.2? If could only be , >> I=E2=80=99d be inclined to agree that this is logical. I also understand= the >> case for , though this is slightly less clear. But, what if >> someone used 1.2? Seems a bit unusual I know, but maybe >> someone would want this. Again, I don=E2=80=99t think we should guess if= there=E2=80=99s >> a chance we could be wrong. > > I feel this very much depends on how bad =E2=80=9Cguessing wrong=E2=80=9D= is, and as previously > discussed, since it=E2=80=99s rather easy to correct or set `org-image-ac= tual-width' to > prevent this, I=E2=80=99m not sure it warrants being terribly concerned a= bout. I think the problem here is that `org-image-actual-width` is essentially a global solution to a potentially local problem. I can't set `org-image-actual-width` to nil for just one image. > Thanks for continuing with this. Moving forward, I think it would be best= to: > =E2=81=83 Make a patch just for prioritising `#+attr_org' > =E2=81=83 Make a patch just improving the regex (before or after the `#+a= ttr_org' patch) > =E2=81=83 Discuss changing the behaviour of image previews separately lat= er / in another > thread, linking to this thread when doing so. > > How does that sound? Yep, sounds good. > Lastly, a comment on your documentation patch from earlier. I like the ch= anges > to `org-image-actual-width', however I think you=E2=80=99ve been over-eag= er with scrapping > the current docstring for `org-display-inline-image--width'. Since the be= haviour > is implemented there, I think it should at a minimum be documented there. > The docstring for a function referring to a variable=E2=80=99s documentat= ion for how it=E2=80=99s > handled by the function seems a bit weird. I was torn on this as well. However, I ended up feeling that it would be worse to duplicate the same information in two places. This requires updating the information in two places instead of one, and, worse, the documentation could easily diverge. Because the function isn't public-facing, but the variable very much is, I felt it better just to include the documentation for the variable. I also don't think removing the documentation from the function is that bad. A lot of what that function does is to follow what the variable tells it to do. Again, the function won't be called directly by an end-user, so requiring that the developer refer to other documentation for understanding implementation details seems reasonable. Finally, there are numerous functions in org that tell you to refer to documentation elsewhere (especially defcustoms) for further information. Anyway, I still feel that the earlier patch (before regex changes is the right one). But, if you want me to revert the documentation removal from the function I will. Matt