From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 yD9CBlBBeWeNIwAAe85BDQ:P1 (envelope-from ) for ; Sat, 04 Jan 2025 14:10:24 +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 yD9CBlBBeWeNIwAAe85BDQ (envelope-from ) for ; Sat, 04 Jan 2025 15:10:24 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=GT7Kt6jf; 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=1735999823; 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=Xway9tDbgeVaN/OYUtbyKlOK3KIztyBczLqhZyv67JQ=; b=BSaBYxQsnVnGCYdN+zeejlCBLM2ZRFL0j/KduIxtMI3qnCVpIMaaMIXNrj9a1p1HmFZt6V e32uDIjqbef/7L85ity/2TY0emS+1deqUlaY+Sta/W9xKrGX6pCqtDA2zo33rf7qomugAz uyp+4YYRjijQH9nNMIgoyl82XS7XiipbPO6f8sjs66lsFhIK0ZNAk2TAQc+gXCld1l8sX9 tOPSDwvAa064fYk/IJGt+orWISIdP5CEu0qMv8CWrJmm/Oip7oOmzg5cw33goOT4ZVBmXl JdHoCPNxyiXYEYTfR3uK0C4kICygwAyjqEq2/gKS1hr7D8HAln2a8fV0yfLHQA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=GT7Kt6jf; 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=1735999823; a=rsa-sha256; cv=none; b=YzoU6W10doYm1FH7qHxz+ZHpmzGeL0eem082BSvtMZ91olAcWLbsG6ugqHw6ehQWWRo6cW mHqsvqldKYXiye3Kt/B+o2OfV3vVs4wsuWRQSxsbsqLoBYCfR32niLQTyWeNPlta0basVZ gKnOYX+zffH9Zw/QQbp7XONR4m/cNLyGkx6xhUukYPW2XzcddSumfTVqEFbx8dOd5j56Zc LurPaT86m3NHnHo7pzNWBef1ifE5PovbXMjWj/YDYRCTnR8g8zbwcd/b9n49yPVzNWmXQH EjwgdGwkf/Gj3/Wls1ghL7qqzj5I2i2B91UMGVIJ0GE+L8uTOX+Ur6VGYr2kww== 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 398AF3547 for ; Sat, 04 Jan 2025 15:10:23 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tU4qO-0001xk-OA; Sat, 04 Jan 2025 09:09:36 -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 1tU4qM-0001xL-77 for emacs-orgmode@gnu.org; Sat, 04 Jan 2025 09:09:34 -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 1tU4qJ-00008F-Lf for emacs-orgmode@gnu.org; Sat, 04 Jan 2025 09:09:33 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 24114240028 for ; Sat, 4 Jan 2025 15:09:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1735999769; bh=Xway9tDbgeVaN/OYUtbyKlOK3KIztyBczLqhZyv67JQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: Content-Transfer-Encoding:From; b=GT7Kt6jf0w78pfqDv9Lli9hPScTm0DjRMljBeBlbA8vvsQlMe/e6A2vI/GBAu0Pp7 sg+lLlIi/4LxomNoopnk73CbiAJX+ifMofhFL4v6r77vTwUqSQjur+pjt14rgLerTw KFpViRhOIG6f+QdL1m9zbCvpVKdQ28h0laoISEPA0VYvtyM/LzdwIjNzhbGQQr+tAR rs0Gt0wvso8pc4IUEd68lv1TcfbZIBevDiNQPqlaRcS6Yrl3EX629cjQB8IrS0rU9p YrPjiIxUM6VivR4h5Boe59MMWHNds/ddoea+6rHPlzrINUziGaHiQX2Huxw3uJMZ8r WUG8CIIaPbHvQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4YQMkw46SZz6twR; Sat, 4 Jan 2025 15:09:28 +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: <87wmfb8hgv.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> Date: Sat, 04 Jan 2025 14:11:49 +0000 Message-ID: <877c7afz2y.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_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: mx12.migadu.com X-Migadu-Spam-Score: -5.96 X-Spam-Score: -5.96 X-Migadu-Queue-Id: 398AF3547 X-TUID: ojTQc/lrDOdN 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 in= stead? You are probably confused by `org--create-inline-image'? 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. >> 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. --=20 Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at . Support Org development at , or support my work at