From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.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 4JXCA9Tzj2c0uAAA62LTzQ:P1 (envelope-from ) for ; Tue, 21 Jan 2025 19:21:56 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id 4JXCA9Tzj2c0uAAA62LTzQ (envelope-from ) for ; Tue, 21 Jan 2025 20:21:56 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=EpISfo47; 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=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1737487314; 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=xa69skigjwzV0BEwrQ/v5EJgFXhczcP/z/WZsdTkLj8=; b=FjqWm5B3GA+ZN7VMFp/xVTp0xqiuWT30iMB1QhnzpkbnkWjhU250yv84XJULs/3ck/vUI/ POGC1PMWKJOXg9mXqDtUtm7e4ifGEpqcpkYKGSxp+5XbvUE1pwbRjOHcYfntizk3YlpJkm VkDUpRA/8IAX9Lh+j6XxMcMNpfxIYUbEEL+RRMInP/iGamE9f5ANvNpt8N9fB36ityrYBQ wEh0cb/f+pVQOUEhstIXTqDmvaf4ZterxAqFJygB9u6+/kjxzqCJp4gWnKii2jihiOTxpA 4B6za/UcXOpi7OozIaiN+XRcc6i40G+dq8DlkVP6m/Nf2mRv+EvEG3ZDjE2y5A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=EpISfo47; 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=none) header.from=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1737487314; a=rsa-sha256; cv=none; b=UQMW2I27e2O4ArB+t2CkNy+1Rlb/+iFRhXo49U+AkGTxHoQ1Dw28YcgZC8tS6EcvzxKVsh jGlhEuvUKreActxKBad1e3H5yWpo/a/d/TvI0AFQYHZk7swaw4XhuhPpl2mRb3uSRtqJJR mEz7nm5OoFCu8mQtuNc/nCeHajn5cFWvuBRlpTXVxoKcilDqktxV6fGO8d43MsBmUyxjN8 T6GU3yudFD8X+2NHCi7y39KNWswkD5aMcdLAlQ98BJiOSEm8OnKlDO++AVqX4mth+fSy/m 8zh8rqcDNY6bIybotsKRo9muF+VyOwAimk+vb4lFiKqnSzK1OADQ2UZHqmpPFA== 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 7990A7F44A for ; Tue, 21 Jan 2025 20:21:54 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1taJni-0004oi-Kw; Tue, 21 Jan 2025 14:20:38 -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 1taJnb-0004m2-4S for emacs-orgmode@gnu.org; Tue, 21 Jan 2025 14:20:32 -0500 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1taJnS-0001sQ-00 for emacs-orgmode@gnu.org; Tue, 21 Jan 2025 14:20:29 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 1D908240027 for ; Tue, 21 Jan 2025 20:20:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1737487214; bh=U3veZvonUEdgrKnw7/nYtDuIKhtWbmwQWG01o8YmPok=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: Content-Transfer-Encoding:From; b=EpISfo47u6uIpk25cywnrr8NxlwsK3JQYWmOAoMXSKY426clLIbTqPdDWJDbp9k0g /4CJO723x/Xdh6s0BP62p9XwkGtWGVAvAtj5aEjB4zXtgJ2ypgq4V6cz1NjwyaNH3k 1J3rjpZnA7VFxg+Z41RJU61X6y77c2G314HsUYP+beUFFYrWpQHWP0kKlCcVwP2rfK i8/WjQU9cifdVDINl4cwfdSHppP3/NXws9bdphM3gue+/lXnM5n2/Jh1YXPpbRBV0n CBXwHH3z8xnCDFbD6jywRFe6OBWOQfXfSDM9OmJb9cErZZmF6du6FwomQpywOin9fO pOjus3L7FP7PQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Ycxqd3jz8z9rxM; Tue, 21 Jan 2025 20:20:13 +0100 (CET) From: Ihor Radchenko To: =?utf-8?Q?Bj=C3=B6rn?= Bidar Cc: Karthik Chikmagalur , emacs-orgmode@gnu.org Subject: Re: Link preview generation with new link preview property In-Reply-To: <87r04y3kph.fsf@> 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> <87h65wdv0i.fsf@localhost> Date: Tue, 21 Jan 2025 19:22:31 +0000 Message-ID: <87cyggq8eg.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.65; envelope-from=yantar92@posteo.net; helo=mout01.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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_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." 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: -4.99 X-Spam-Score: -4.99 X-Migadu-Queue-Id: 7990A7F44A X-TUID: /EjNj3M1ULd5 Bj=C3=B6rn Bidar writes: > The thing that confused me, but I think I wasn't aware of not getting it > yesterday was that org--create-inline-image creates the actual image > object. I was thinking that the image object would have been created in t= he > handler and then passed to the helper function. Feel free to improve the docstring. I do agree that it may be confusing. > I think what also confused me that org--create-inline-image talks about > files not image-data. Do I understand correctly that for image-data the > handling of files in line 1035 is just skipped? May you please elaborate? I do not quite get your question (or maybe have something else on that line number). > Another that I just came to mind what is better for such a use case the > use of a buffer or a variable to store the image data? Url (and eww) for = example > usually uses buffers. I do not think that there is much difference. Unless we have a huge number = of images (in which case we may create performance problems by increasing the number of buffers - some Emacs operations scale with the number of buffers). > +(defun org-link-preview-image-data (ov image-data &optional link align w= idth) > + "Display raw image data IMAGE-DATA in overlay OV for LINK. > + > +If not given ALIGN and WIDTH is derived from LINK. If ALIGN and/or WIDTH are not given, they are derived from LINK object (ast node). > +If LINK was not passed ALIGN and WIDTH have to be given. If LINK is nil, ... Also, we need to explain the possible values of ALIGN and WIDTH. Maybe even provide some defaults (maybe even via cl-defun) --=20 Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at . Support Org development at , or support my work at