From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id iAutFHm+i2ftaQAAqHPOHw:P1 (envelope-from ) for ; Sat, 18 Jan 2025 14:45:13 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id iAutFHm+i2ftaQAAqHPOHw (envelope-from ) for ; Sat, 18 Jan 2025 15:45:13 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=thaodan.de header.s=mail header.b=aF73EHNl; 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=1737211513; 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=hacJxrORRMvgBa5aAEfjZpX6HA/1JP5hww7QOxllQMI=; b=iRCC9tYoRTiM1B34jLE9qaOdPMfko3Rs6uidqjQ9MyJ3kdjfzsWBL3PNnGDmOWydWYMvK4 yioLTzm65vV8bZJLu82h61LQj78mklC7OSdcMINMwbtcB3a4LTZ1XTmZRvwZRlJwsnhXwN 87ZxI4dXpdKXSLR8GY37EyesVjXmcWw/PljDqvoE9uwJjZYVAG7KJBunxepqSV99Pex60v QEGowBWRLQAlfs6sKuTfyQZCdHlJ41zh6J6jENrwgM5uGTH5BUYAQtmnAG+6un0Ara4evZ TJFM95cHMsYYdAsDnWZJAjFQSJkBykBS3WwGGfwSNWgSQ0AAkVD2latnY2Lytw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=thaodan.de header.s=mail header.b=aF73EHNl; 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=1737211513; a=rsa-sha256; cv=none; b=o2oF4isElBZvnzjhCo8/+TRtWwr/SSim74qTNI/aGBgRqlocA/5/C3T/FUbIyi2qx8cstc iK3znyslucTl5Tet1so0omrGVOMTZd4lBgKmML2yG8ADX/B251IBOoT+/ciHdnILBs8imn 0B6hvASTT2tLUsAd9knvCAqCpoF11blg234G+MZj/diAFVr5bAUgFJDnK3SKU6QUo1B7J4 J7FWQsNHZB+qcSXpqR/UKqkIikOl0IznzBQXLzDnAzCSz4ozD+XvX05hqmAumx0qEbcmxt PmehkzOtAyOEUa/KIdwRhtZCt/h7dT3bVKgRdOHqsgbu8euyTD3r8TX1aT9neg== 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 9D7874B55 for ; Sat, 18 Jan 2025 15:45:12 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tZA3q-00088P-Tv; Sat, 18 Jan 2025 09:44:30 -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 1tZA3p-00087e-7l for emacs-orgmode@gnu.org; Sat, 18 Jan 2025 09:44:29 -0500 Received: from thaodan.de ([185.216.177.71]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tZA3m-00024C-Jm for emacs-orgmode@gnu.org; Sat, 18 Jan 2025 09:44:28 -0500 Received: from odin (dsl-trebng12-50dc7b-49.dhcp.inet.fi [80.220.123.49]) by thaodan.de (Postfix) with ESMTPSA id D6F84D00076; Sat, 18 Jan 2025 16:44:23 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=thaodan.de; s=mail; t=1737211464; bh=hacJxrORRMvgBa5aAEfjZpX6HA/1JP5hww7QOxllQMI=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=aF73EHNl8pPAErvblFAtkFYy6E3JZUBj9u8XVrvIG8qpPF4454IgjDpJ1iHDu3KQH 2HqWkSpssIyifZ5awkm+DHLkKI4zV5KCllYUuD757U1DS00wZud5gESiwSiTsOLVqR VxcPsR2n3SG//yc33dzeinHaKTpHmF15qSjefXpj52fbdjv1mYeXgXPopNttlNcGLW 8m7VSaaSQMqVUDfrzSIBLB4Nf/DpLgJAnk2MKAAoYSXT4Hu1QoBGW4qmC1l5L+/zRn x3gnn85nvr4aCcLGzvEgho2Xoq8NN2okeveXEeKW0QSStxDQGSEG508KCnCT/XGeN8 S85/8uvn4jMQEpHCsF31PMEii9ZtS2zCmJllf57y7sgW4Onp6KqDFc8PmsI4cieDNG f+eGuSaxBPRDRB8IjLOHh2rEzipvyTBHSwR+pp71qJuWe1Jej0I/i8+DuUTpP/efdd 9q0PQptHFR6nJyruPkMCliKhoD/ezZw73XOPqmA9eeKPwwdk3Zo0h8bAsWtm9juSQX UrB6UVy8K0+AyMr5BBtcqdIo39Ed52PXlbXCVQOFqR72SH3n1wADnSHjRR3HMP8yu4 chd0+HRsrNOiAvM96g3pg68B5p8Ih7mMOU/ZQx52dTP3i2KriDG0HzL1jpUG5LFCiv UqadaCtsYxX7syJtzgGjxpes= 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: <877c7afz2y.fsf@localhost> (Ihor Radchenko's message of "Sat, 04 Jan 2025 14:11:49 +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> <877c7afz2y.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+iJMEExYKADsCGwMFCwkIBwICIgIGFQoJCAsCBBYCAwEC HgcCF4AWIQRR8X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) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.216.177.71; 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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Queue-Id: 9D7874B55 X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -1.93 X-Spam-Score: -1.93 X-TUID: 4BqQpVQP+uJU Ihor Radchenko writes: > Bj=C3=B6rn Bidar writes: > >>> 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 i= nstead? > > You are probably confused by `org--create-inline-image'? Possibly but I simply was confused by some of the properties of the overlay being set and some of them being taken from the image object.=20 > IMHO, it would be best to pass image file name/raw image data to > `org-link-preview-image-data', not an image object and call > `org--create-inline-image' from inside `org-link-preview-image-data'. > That way, we can automatically obey Org customization wrt image > alignment, image width, and image max width. For that case using org-link-preview-file should be sufficient?=20 >>> 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? > > Yes.