From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.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 uJzwD5PLXGdtFQAAqHPOHw:P1 (envelope-from ) for ; Sat, 14 Dec 2024 00:04:35 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id uJzwD5PLXGdtFQAAqHPOHw (envelope-from ) for ; Sat, 14 Dec 2024 01:04:35 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=thaodan.de header.s=mail header.b="qPt/6+kW"; dmarc=pass (policy=quarantine) header.from=thaodan.de; 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=1734134675; a=rsa-sha256; cv=none; b=Z43+KhadkjF7PVpoCSvdsLlMuWVCuWO3iu97oi7d/RZnlEQVRXDuwpStsasoIdxkEMYOvM P1AptFrGoQb5Hrkswz68ll1/+/4wW1HR3Z6GS+YcEjiTLPlbxlchNdGKen6dPnPT1NScYy cgf+xAO+M9iBsu4JCzDHWTI7tfrv/HMo59y+MzQHj46EZ2F0vDNY8VCQJdiZ81+6dyE/rO 2yRZi0xWBYKsn0xWMErwvJa64AOhKd3kGe3q2r9Lx5v0LW+6MWfSDqeXMHcSjUwlDwI9BB AcoHMgfEsGQNT28nt2WJrHQKt+fL9O6OUfDPTgK+tfWBOIhM+Tyv/6LZi9+e1g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=thaodan.de header.s=mail header.b="qPt/6+kW"; dmarc=pass (policy=quarantine) header.from=thaodan.de; 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=1734134675; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature:autocrypt:autocrypt; bh=T6rPOZF4ZlUHNxNdgqdML/bBETEX7c9SL/w4FMaETqg=; b=N9LUrNicVaOHCC2umah+meuowaEVgWEdNgK0Qt0ayrEgzdXQXCuQSFWU5IJU7roAo/Vti3 vErb0Dt0mCud7W1mhRKvu4yNcnGVTvA4RSSCBSWC+r215LnYrzcD+pcqMph2qoHKEbkYLr u6HhyotPuf/6FFX5Zbzg/kBq6NPUfe8jIHVJd6hkiXY6CNmOaiaUBZVgiqkcdYR3pqNGhX rsbcEaSPmu5HaSUfhias5RE2mjM0WyVEICad6nMeV8qPpSFokogwhjQAnjYWzUrQzLBLpB 4VSveKHtK3sZfZIR/K7B29krixEu3WVxKXEDWV3qFe5VjWEVzPkBAZaH63RiFQ== 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 259471E3D4 for ; Sat, 14 Dec 2024 01:04:35 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tMFd9-0003wL-KG; Fri, 13 Dec 2024 19:03:35 -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 1tMFd7-0003w8-38 for emacs-orgmode@gnu.org; Fri, 13 Dec 2024 19:03:33 -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 1tMFd4-0003C5-Ot for emacs-orgmode@gnu.org; Fri, 13 Dec 2024 19:03:32 -0500 Received: from odin (dsl-trebng12-50dc7b-49.dhcp.inet.fi [80.220.123.49]) by thaodan.de (Postfix) with ESMTPSA id 80DE4D00045; Sat, 14 Dec 2024 02:03:26 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=thaodan.de; s=mail; t=1734134606; bh=Lvw9xuobq5mxEUXlCKFaTEdWPFx9qLzMwQzYjk4LKR0=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=qPt/6+kW3L6H88+H2YBSzI4emZLyVCwDaexSEvxGgLkzj6B372DDPdxxuYPCd+/s5 YnK07SfPHQ4HwazzzQeJPGDI5nx62qaSysXjK2FMQXnNK12GRwYhh80CxMjVNX+z1K VEgPSRm4gxi3ZUlYIVg+D7OD2wYAInfhoVqk5HT4vwB+8JhOnQWz8Wdn8O7GYB3Y/o EAsggMqFO5AdyvZo/TcQHOqDNgdZJK4u8MhKZv0UEOl+4RkeqP/IqabRVdmi8DRcdr uC48TxOEwiyO2UVwFIm/aYh4oT6dnkdEhlrYfCKJZnJpuYnQ7Rr1gFOVNBOxeKqZCJ 67Jx1WojnYgBrbchr3X+R3EHZ1Rn+/RVSlH8IBCTVgyHyczVDrk8BKzwncI4/lyUfd Vtt38vybPn6M9hT/At7+WHVq2iIKhrjUvsgF3ej5teWyJY82Urg2cWrgZW4W06O688 znbQpWjXQA7QPooGzw+ejWtkT3l2HosGjD3LJwSkO3FUXvGiYwbHy+LdBB+yDXd9yH f0i2r6Wj/nRPwHtj6t4/sjO1TZPKXXDNNZP6hr3TM58bSms9Bau0znySWmLJtIjYfM pey4wnKe2rCc/rAwrfPyi+bnuZtUpazfZp9+cZ48ejCGuzCel8VV3/xhGEAG7phdSX nH9zo2ydArbS8XRnF3B04Tiw= From: =?utf-8?Q?Bj=C3=B6rn?= Bidar To: Karthik Chikmagalur Cc: emacs-orgmode@gnu.org Subject: Re: Link preview generation with new link preview property In-Reply-To: <874j382kue.fsf@gmail.com> (Karthik Chikmagalur's message of "Thu, 12 Dec 2024 21:49:45 -0800") References: <6755f138.0c0a0220.40388.51fbSMTPIN_ADDED_BROKEN@mx.google.com> <874j382kue.fsf@gmail.com> 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 HgcCF4AWIQRR8XbrdUcwHqcpqKtcG3ShZRxfaAUCZNf2FQAKCRBcG3ShZRxfaCzSAP4hZ7cSp0YN XYpcjHdsySh2MuBhhoPeLGXs+2kSiqBiOwD/TP8AgPEg/R+SI9GI9on7fBJJ0mp2IT8kZ2rhDOjg gA6IkwQTFgoAOxYhBFHxdut1RzAepymoq1wbdKFlHF9oBQJk1+ntAhsDBQsJCAcCAiICBhUKCQgL AgQWAgMBAh4HAheAAAoJEFwbdKFlHF9oBgwA/iQHwe0VL4Df4GGTYlNjMSHFlIkBmN4UfYGLYj3E TrOUAQC51M+M3cjsL8WHdpBz6VAo6df9d+rVwhQ9vQuFHqevArg4BGTX6T4SCisGAQQBl1UBBQEB B0Cbohc3JEfn005/cm0AOGjSsW1ZxAkgaoVNjbpqk4MgNAMBCAeIeAQYFgoAIBYhBFHxdut1RzAe pymoq1wbdKFlHF9oBQJk1+k+AhsMAAoJEFwbdKFlHF9ooHABAKGmrGBic/Vys3BBrOQiRB3Z7izO HwhqTRpAqFZtXS2nAQDZhp/5aYw1TZjTzkm1KVt9QiYnjd/MvxRE9iaY6x4mDbgzBGTX6T4WCSsG AQQB2kcPAQEHQAgRJq/tMcCCB2XyA5WZpu7GvpRx0m9IPRWazeqhOq7uiO8EGBYKACAWIQRR8Xbr dUcwHqcpqKtcG3ShZRxfaAUCZNf71AIbIgCBCRBcG3ShZRxfaHYgBBkWCgAdFiEEUfF263VHMB6n KairXBt0oWUcX2gFAmTX+9QACgkQXBt0oWUcX2jeSwD6AtWn0cuo8IF35YRo4o3cDRJnUfJnbvJy GxyCDThR+zYBAKG6/jdwmZkBQZKslnDAbMMd2WfiZZT5JW3IWC4EaKMO7HkBAKYPGZ3UbfkRvfFK S+pQ9CgtNfkSJQBtT1Ob7Y6nsacgAQCpyXN7yppmhW/oBgivITPy9Lkg+V4NK9WZYZCU9Q7LBA== Date: Sat, 14 Dec 2024 02:03:25 +0200 Message-ID: <87jzc3nnaq.fsf@> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain 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-Spam-Score: 0.26 X-Spam-Score: 0.26 X-Migadu-Queue-Id: 259471E3D4 X-Migadu-Scanner: mx12.migadu.com X-TUID: 9RiTyS9jC7JT Karthik Chikmagalur writes: >> The PR do port the package to this new handler property: >> https://github.com/gaoDean/org-remoteimg/pull/4 >> >> However it left me with a few questions: >> - Who is supposed to take care of the scaling/width of the preview >> image, the handler or the caller of the handler? > > The handler is responsible for sizing the image. The reason for this is > that the preview does not have to be an image -- it can be any kind of > overlay decoration. > > If you decide to use an image file as the preview, you can call > `org-link-preview-file' inside your handler to handle the geometry for > you. This includes the size and alignment specified by #+attr_* > keywords, `org-image-max-width' and `org-image-align'. > > If you are using a preview image from image data, you'll have to copy > some of the code in `org-link-preview-file' to your handler if you want > to respect these user options. 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. In the example I mentioned it should be possible to use the cached file from the url cache but that might be not so easy in other cases. >> - When calling the link preview function for a description with prefix >> argument 1 I noticed that it doesn't get the contents of the >> description. >> Why is that? In this instance the link looked like this: >> [[https://stable.melpa.org/#/rpm-spec-mode][file:https://stable.melpa.org/packages/rpm-spec-mode-badge.svg]] > > I don't follow. What do you mean by "it doesn't get the contents"? Did > the preview work as expected when you used a prefix arg of 1? 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.