From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id MJofIBOqPGaX7gAAe85BDQ:P1 (envelope-from ) for ; Thu, 09 May 2024 12:48:51 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id MJofIBOqPGaX7gAAe85BDQ (envelope-from ) for ; Thu, 09 May 2024 12:48:51 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=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"; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1715251731; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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; bh=gb3p5HHRs0mB4OLJr18+S8CAl17aYV4XVU8LVwwGfT8=; b=Sk2co37S1x/855bezaMBqu3YzeA68K2jUj64winjs+0P6jYp3930tolynpcbU0uIwb6NEN G11CC9eoxOFkAswDdgEJp9ER4z0oqGyKfF24AOshlU1TOCbQCaiq+W2B1VQ7DGMYMeKBqA pmiSiwREaOnhGyqbV3qFIzEQxT/T0YDocKekzJ6LOoDfFcO8ek/9MZpsFq5Ay1s+0Os+xC gfNhQh2k8isA5zvvXbv834yD5PrPId7AGExnUtGzR208qZ/cBCUc0P8hQgGak2KRH0JJxA taCA8aZ+ZZwbRAbNsgJ1cSma3s4gb2736dNC/Ae5S08LSDyWqjdMmnpz1IKsWA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=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"; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1715251731; a=rsa-sha256; cv=none; b=RmzxhWlP+LddbTUNGSRaTZVAbJwU5Oz3/z+TXUdYarK9RgqnEPqAhClQZrBGIVju7bkNX2 O1xFDTg9x/F4CT0KhzIKgAy+2YgzcLX3fSjkeXeHlCFGWJQGqEk/1JZ9sUBwTN3emGJVSe mWU5pesRBVBdj8abqwBK00ed2qbqqgm6KGDjoOCh+DGJ4/RqVZANP9tuYjAfSTt+x97vgs /0SZQiTWnzZGrtJA0rB5vgDw1zTHmbeWOrs/uLtOrRPJg4eDk4trYT3THmCC5xUNtd/2/9 v9g3UOGb2inmlLRLzOIDPq3+vPAUfh1qxl2OrU1zdard2ClbgT7qebd6e9yX1w== 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 557D853DF1 for ; Thu, 9 May 2024 12:48:51 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s51Jl-0000PV-56; Thu, 09 May 2024 06:48:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s51Jj-0000Md-AG for emacs-orgmode@gnu.org; Thu, 09 May 2024 06:48:03 -0400 Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s51Jh-0004Ml-Cy for emacs-orgmode@gnu.org; Thu, 09 May 2024 06:48:03 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1s51Je-0007mS-C6 for emacs-orgmode@gnu.org; Thu, 09 May 2024 12:47:58 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Max Nikulin Subject: Re: [PATCH] Fix regex for determining image width from attribute Date: Thu, 9 May 2024 17:47:49 +0700 Message-ID: References: <87czmtuy0p.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> <871r2ucuhz.fsf@gmail.com> <87cyq49o01.fsf@localhost> <875xvoshex.fsf@localhost> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------BwdAyqqY3ZISWtYDEy31G7m6" User-Agent: Mozilla Thunderbird Content-Language: en-US, ru-RU In-Reply-To: <875xvoshex.fsf@localhost> Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 26 X-Spam_score: 2.6 X-Spam_bar: ++ X-Spam_report: (2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FORGED_MUA_MOZILLA=2.309, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NML_ADSP_CUSTOM_MED=0.9, 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: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: 0.22 X-Spam-Score: 0.22 X-Migadu-Queue-Id: 557D853DF1 X-Migadu-Scanner: mx13.migadu.com X-TUID: BlRdNmeZTHZt This is a multi-part message in MIME format. --------------BwdAyqqY3ZISWtYDEy31G7m6 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 08/05/2024 17:54, Ihor Radchenko wrote: > Max Nikulin writes: > >> #+attr_html: :alt Image width test >> #+attr_beamer: :width \linewidth >> #+attr_latex: :width +.5\textwidth >> #+attr_md: :width 75% >> [[file:babelfish.png]] >> >> - I do not mind that just "\linewidth" is ignored. >> - The case of "+.5" should either be supported or at least documented >> since it is a valid floating number. > > Was it supported before? No. It is my expectation based on earlier discussions that fractional numbers were added namely for LaTeX. I used leading dot in \includegraphics[width=...]{}, so I was surprised that Org ignores it. Explicit "+" is just generalization, this form is supported by LaTeX and elisp. >> - It is really confusing that #+attr_html casts shadow on #+attr_md. > > No, it is not. I see no reason to prioritize markdown attributes. Above #+attr_html does not specify :width while #+attr_md has a valid value. It is the reason why I do like current behavior. >>> +++ b/etc/ORG-NEWS >> >> I think, it is better to avoid "is ignored" here. > > May you convert your suggestion into a patch? See the attachment. --------------BwdAyqqY3ZISWtYDEy31G7m6 Content-Type: text/x-patch; charset=UTF-8; name="0001-ORG-NEWS-Reword-inline-image-width-note.patch" Content-Disposition: attachment; filename="0001-ORG-NEWS-Reword-inline-image-width-note.patch" Content-Transfer-Encoding: base64 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