From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id 4IkcH9aWeGfOggAAe85BDQ:P1 (envelope-from ) for ; Sat, 04 Jan 2025 02:03:02 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id 4IkcH9aWeGfOggAAe85BDQ (envelope-from ) for ; Sat, 04 Jan 2025 03:03:02 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=thaodan.de header.s=mail header.b=tI452f2v; 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=pass (policy=quarantine) header.from=thaodan.de ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1735956182; 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:autocrypt:autocrypt; bh=1f0rbDhylKU87ORqAjuapyj2P7Z9bUZo8aUkEwcdjh4=; b=BguNuIGg2hZrTQc69H6L/Fzjo7T3pOGPYF+oiDOwJ2OpdBMDrez0gmy620mbZEmqM+yWvb UKNHG2dteYltwM9mwmXDDHpzG4k33nbVDgFsBo3T+Fnz3yST3gxvGThNcHL4+utxS0iGHS I3KZRBnRn+sysv7c+HOFUE3ndmBXOPaDHtOI1gbr4lufppgfErUaKhQI6VEe9fm851ofjI WVLD9RX+XhcPfF3cugzV8ZajZXbHI+nzTjbpkaVVChvi4oRyJo4bI+KuaJhFXnQszq+NDg 6UFALXFygJUXP+4WWSuK6gTFpLWaNBlu0L9BtyHUorPa6wYXiullaz5EzG1z1Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=thaodan.de header.s=mail header.b=tI452f2v; 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=pass (policy=quarantine) header.from=thaodan.de ARC-Seal: i=1; s=key1; d=yhetil.org; t=1735956182; a=rsa-sha256; cv=none; b=m7OnD3+rfaCud/2lWt3HElUQ+PZKqXboSuZ2/WbXvs7i1bUfgnpawwcrPixRhqixC1Jrd2 FiIiHcwrlHHPPYIXEMhhQ5bURNj3OZnoI/NpPBErt/8gEvCPN9p+SMKBnOKlsT/N+p2RZx zcRI6hUP4OZS2IoQBwyJh8FBwoxky12Sa96umpL/65vfxS+9J+1I/KdO//jKow6botM/mH exUnE+Wczntm5D0M7LRqFkMmu+Wi0JO4GUaVRiiZyQ5N9mnhu6T29O8RXbI9JCuhZeg1+e r73fEgGtRpBhFyv5oWEwWlovu/5YSfwFWtSC8rgun53eKz/xNDqGIRm6mwkdVw== 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 E9D0386624 for ; Sat, 04 Jan 2025 03:03:01 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tTtUJ-0005X7-4z; Fri, 03 Jan 2025 21:02:03 -0500 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 1tTtUF-0005Wm-H2 for emacs-orgmode@gnu.org; Fri, 03 Jan 2025 21:01:59 -0500 Received: from thaodan.de ([2a03:4000:4f:f15::1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tTtUC-00055k-Gt for emacs-orgmode@gnu.org; Fri, 03 Jan 2025 21:01:58 -0500 Received: from odin (dsl-trebng12-50dc7b-49.dhcp.inet.fi [80.220.123.49]) by thaodan.de (Postfix) with ESMTPSA id C319CD00049; Sat, 4 Jan 2025 04:01:52 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=thaodan.de; s=mail; t=1735956112; bh=777uhfe2Dq/S/itqk+pwKBTGK3TWw7DIE7XpLIyh0aE=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=tI452f2vVsWWpAIT7SHKyxWP2QaZlIzV9aS7RkSL/VwRS6V9Q4vu7rQ1Yy6+fzl2U HTFG+fBOEdS2O76PL24lYUhs+xmpJQMZY2vtY2uiRt5avuJD33OzMNU7/VLfSbPdLh n2m1xaKobRp59TS5VU3ZpolIdl/1OkDXs1FQ4lrXwrI5Lykqarz83vzDImffQroZFi asSWb19qQFyDHY53cp9ec4vN5a8TL8E6CAvrZr2Y6uoeYUDOSW74otCbtxg9gFMXeI crZqhtLeWm0lqT/2Qm5zsStf9tHwDTniSOPoEaZM4hTgqG1CcSuh5S8mVSslZkLxV1 V4PyRHOrGaLJKq50YZWcujJFDCbSyC7PqggNHLjqS55Zcxdk5wgiZpxIFO4H4aOE8H kDu3J2P6QB4mJfHoHdYAAw8pwpTs8ZRWJbx2iju//cZ/6KjMx2WTEElYdCYT664tkS zmTYS8BBxzKdtZIHwxzNj+hOEEq/kIwjVSeyXzkaRXxiGrINfPf/a1OpZ6iwaqYnzb ZIyAL6fsWGcj+2QQuwJ69oo1gXLBc00ctv/GcjapdJNt3iFsijSf4NLrFX4/SPDHeq MOtWY5ArdKr0jhhtL3Y3n96f1rm2G6+YBVyz77PB9QSJ8rmkRCZFG6uB0mLIOe4v6x TQBuV2NIwaQdSqHfGPXjPBSo= From: =?utf-8?Q?Bj=C3=B6rn?= Bidar To: Ihor Radchenko Cc: Karthik Chikmagalur , emacs-orgmode@gnu.org Subject: Re: Link preview generation with new link preview property In-Reply-To: <87msgd2j9k.fsf@localhost> (Ihor Radchenko's message of "Mon, 30 Dec 2024 17:05:59 +0000") References: <6755f138.0c0a0220.40388.51fbSMTPIN_ADDED_BROKEN@mx.google.com> <874j382kue.fsf@gmail.com> <87pllug2y4.fsf@localhost> <87ldwfnff4.fsf@gmail.com> <874j328aym.fsf@localhost> <6764aa79.050a0220.23273b.09a5SMTPIN_ADDED_BROKEN@mx.google.com> <87y102mgdx.fsf@gmail.com> <87msgd2j9k.fsf@localhost> Autocrypt: addr=bjorn.bidar@thaodan.de; prefer-encrypt=nopreference; keydata= mDMEZNfpPhYJKwYBBAHaRw8BAQdACBEmr+0xwIIHZfIDlZmm7sa+lHHSb0g9FZrN6qE6ru60JUJq w7ZybiBCaWRhciA8Ympvcm4uYmlkYXJAdGhhb2Rhbi5kZT6IlgQTFgoAPgIbAwULCQgHAgIiAgYV CgkICwIEFgIDAQIeBwIXgBYhBFHxdut1RzAepymoq1wbdKFlHF9oBQJk1/YmAhkBAAoJEFwbdKFl HF9oB9cBAJoIIGQKXm4cpap+Flxc/EGnYl0123lcEyzuduqvlDT0AQC3OlFKm/OiqJ8IMTrzJRZ8 phFssTkSrrFXnM2jm5PYDoiTBBMWCgA7FiEEUfF263VHMB6nKairXBt0oWUcX2gFAmTX6T4CGwMF CwkIBwICIgIGFQoJCAsCBBYCAwECHgcCF4AACgkQXBt0oWUcX2hbCQEAtru7kvM8hi8zo6z9ux2h K+B5xViKuo7Z8K3IXuK5ugwA+wUfKzomzdBPhfxDsqLcEziGRxoyx0Q3ld9aermBUccHtBxCasO2 cm4gQmlkYXIgPG1lQHRoYW9kYW4uZGU+iJMEExYKADsCGwMFCwkIBwICIgIGFQoJCA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> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a03:4000:4f:f15::1; envelope-from=bjorn.bidar@thaodan.de; helo=thaodan.de X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 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, INVALID_MSGID=0.568, SPF_HELO_PASS=-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-Scanner: mx11.migadu.com X-Migadu-Spam-Score: -5.49 X-Spam-Score: -5.49 X-Migadu-Queue-Id: E9D0386624 X-TUID: ZTJrWksZCmWO Ihor Radchenko writes: > Bj=C3=B6rn Bidar writes: > >>> It looks like you are respecting the alignment specifications, set via >>> org-image-align or the :align property of #+attr_*, but not the :width >>> property. Is the idea that the preview implementation that provides the >>> image should independently use org-display-inline-image--width? >> >> The width is set before the inline image is created. I'm not sure how >> this should be handled. Is the with set when creating the inline image >> Ihor? >> If the width is set before the image is created how should it be handled >> in >> the preview image-data function? > > Both alignment and width are derived from LINK AST node. > I am not sure what is the problem. > AFAIU, Karthik is simply asking why you decided to calculate alignment > from LINK, but not width. My question was because the width is set through the width of the inline image, i.e. the image-data passed through the preview function. Is there no difference if function using org-link-review-image-data has not set the width of the image and then we set the with of the overlay inst= ead? >>> At minimum this requires making org-display-inline-image--width a public >>> function. But it would be good for org-link-preview-image-data to >>> respect both properties. >> >> I agree with both but I'm not sure what should be done on this. > > If we think about the API function to be more useful, we can derive > alignment and width from LINK itself by default, but also provide > optional parameters, so that the caller can override the values > manually. If both alignment and width parameters are explicitly > specified, LINK does not have to be provided. How would that work? Make link align and with optional and fail if align or with are missing without link?