From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>
Received: from mp2.migadu.com ([2001:41d0:303:e224::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by ms13.migadu.com with LMTPS
	id KCiLAektXWc6fQAAe85BDQ:P1
	(envelope-from <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Sat, 14 Dec 2024 07:04:09 +0000
Received: from aspmx1.migadu.com ([2001:41d0:303:e224::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by mp2.migadu.com with LMTPS
	id KCiLAektXWc6fQAAe85BDQ
	(envelope-from <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Sat, 14 Dec 2024 08:04:09 +0100
X-Envelope-To: larch@yhetil.org
Authentication-Results: aspmx1.migadu.com;
	dkim=pass header.d=posteo.net header.s=2017 header.b=UtnDINFF;
	dmarc=pass (policy=none) header.from=posteo.net;
	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"
ARC-Seal: i=1; s=key1; d=yhetil.org; t=1734159848; a=rsa-sha256; cv=none;
	b=FF8/FLbUffs6MLfes9gjZXj7G0PzwIfGVeNe9Wo2fvMcShO0OhZvkArlz2Bbgquw+rEvIN
	aFczyQ2+DzRPGlW90gAXLNJ1TwFsT0ahextTBcqiueYuNkFnYavUaV+aheQdGYmbeVpGmw
	ZHq1HNhzGrp91FqcbNGrAQmwJnY0wcmbInFd7sHaNtv/cWMW6+6TLakdG86xJCErx+YiVd
	rSVq85t1XxuDyIcPDjAs50P4p9xqtWjYZyjnPj6cVDxD8LBBaZ+GuiaJA/50ELXzAVQF++
	1MOKvWMS/Nw30hJ3sdaBNU7ojQPz/LTS4MHroEUxW/oWFPugh1G9deCgfFUlKw==
ARC-Authentication-Results: i=1;
	aspmx1.migadu.com;
	dkim=pass header.d=posteo.net header.s=2017 header.b=UtnDINFF;
	dmarc=pass (policy=none) header.from=posteo.net;
	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"
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org;
	s=key1; t=1734159848;
	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=svPlap9Qd26l1ZXaZPJ5hUzinVwzrEiSSqLRwmItfvI=;
	b=eLVLRDwVShqgjwXUCnHS4xJu5nUeUxSObHJjcvcneQ4n5uBuNvUzgFl6qWn/L+hhPVXApo
	BTAjSFwxpva9WJ9KPPU+dWTGEJon71RpWBXT6xi1QJ0d0e/AHLvYN/MG5W6qEH1jZl+hKB
	kSEDjYA5j0EdQYbnkwKMz3Nb0LCc6ZycmptCxUa92zjfLwnP5AqRf+xpkjSQjAaRW3WvUY
	+sBFe1zJ0Tnj10MWV0MWIoqExT0fp1HEP0Y+xv/CqqbOkDxGOD37mhIBQJHpYBURpGNSI6
	CnfvXPwiNK7IT7fnsF4AK6S/+CxBHLGx9eom7dkmaJekgxmXs394YkgTiAgabQ==
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 E021D825F2
	for <larch@yhetil.org>; Sat, 14 Dec 2024 08:04:08 +0100 (CET)
Received: from localhost ([::1] helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <emacs-orgmode-bounces@gnu.org>)
	id 1tMMBX-0002QD-Vm; Sat, 14 Dec 2024 02:03:32 -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 <yantar92@posteo.net>)
 id 1tMMBW-0002Q4-HF
 for emacs-orgmode@gnu.org; Sat, 14 Dec 2024 02:03:30 -0500
Received: from mout02.posteo.de ([185.67.36.66])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <yantar92@posteo.net>)
 id 1tMMBU-0006SY-Ca
 for emacs-orgmode@gnu.org; Sat, 14 Dec 2024 02:03:30 -0500
Received: from submission (posteo.de [185.67.36.169]) 
 by mout02.posteo.de (Postfix) with ESMTPS id 94E4D240101
 for <emacs-orgmode@gnu.org>; Sat, 14 Dec 2024 08:03:23 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1734159803; bh=svPlap9Qd26l1ZXaZPJ5hUzinVwzrEiSSqLRwmItfvI=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type:
 Content-Transfer-Encoding:From;
 b=UtnDINFFp7fP4OhevREVT38lTTR5sCMezxWOPX3mmfAvy3ZLTVoZI3fwylqthiDkd
 sIDXsonHU/rG0WY/ZHETS4sEE0v4jJRdarblUS6LiaZ/2mXpYkzCdfBASbZRittl7s
 4RKVLtuhartmO3LCEqQ4ajnrHf1jnlptw8MQh/K5tcySXN4tG9NnoTbg0+Kan4td0/
 9UwFztLvFY+Y1G+wOOwCu+CWxLMZr29Dm7G/1b5ZxiZ3MulyHWrnGD8rU3OpZ5VRSe
 VwYP/tz2VSiCBem3XUYL/nTe2VBXKjzsj+wGvPZhc3t80Z5lRLmVKSruYXCs6E4K/e
 DEn5Xx73EocQA==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4Y9HGy6xfSz6tw3;
 Sat, 14 Dec 2024 08:03:22 +0100 (CET)
From: Ihor Radchenko <yantar92@posteo.net>
To: =?utf-8?Q?Bj=C3=B6rn?= Bidar <bjorn.bidar@thaodan.de>
Cc: Karthik Chikmagalur <karthikchikmagalur@gmail.com>, emacs-orgmode@gnu.org
Subject: Re: Link preview generation with new link preview property
In-Reply-To: <87jzc3nnaq.fsf@>
References: <6755f138.0c0a0220.40388.51fbSMTPIN_ADDED_BROKEN@mx.google.com>
 <874j382kue.fsf@gmail.com>
Date: Sat, 14 Dec 2024 07:04:51 +0000
Message-ID: <87pllug2y4.fsf@localhost>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net;
 helo=mout02.posteo.de
X-Spam_score_int: -43
X-Spam_score: -4.4
X-Spam_bar: ----
X-Spam_report: (-4.4 / 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,
 RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001,
 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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." <emacs-orgmode.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/emacs-orgmode>,
 <mailto:emacs-orgmode-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/emacs-orgmode>
List-Post: <mailto:emacs-orgmode@gnu.org>
List-Help: <mailto:emacs-orgmode-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/emacs-orgmode>,
 <mailto:emacs-orgmode-request@gnu.org?subject=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: -4.90
X-Spam-Score: -4.90
X-Migadu-Queue-Id: E021D825F2
X-Migadu-Scanner: mx12.migadu.com
X-TUID: ZCl28VPTEoTp

Bj=C3=B6rn Bidar <bjorn.bidar@thaodan.de> writes:

> Would it be possible to also handle image data in the function or
> refactor the org-link-preview-file function in a way that the geometry
> handling is done in a helper function which can be reused by other
> handlers.

There is such function: `org-display-inline-image--width'.
We may consider exposing it as public function.

> The link element passed towards the handler didn't contain the
> description e.g. in this case file:https://stable.melpa.org/packages/rpm-=
spec-mode-badge.svg.

This is expected. See https://orgmode.org/worg/dev/org-element-api.html#org=
22c967a
You can access the contents by looking at buffer text between
:contents-begin and :contents-end. Either directly, or by invoking
sub-parser on the text.

--=20
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>