From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id cOXzM5q9RGfs2gAA62LTzQ:P1 (envelope-from ) for ; Mon, 25 Nov 2024 18:10:34 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id cOXzM5q9RGfs2gAA62LTzQ (envelope-from ) for ; Mon, 25 Nov 2024 19:10:34 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=RuorBr8k; 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=1732558234; a=rsa-sha256; cv=none; b=gIGza6ZgrPjBD5xY86CaSRlSpCSvjkuF6QVoGERl354rP4jys2GHXFUx8sd3gETf+jVBL2 emlLILN7Q5bZAgnDV0lQ0V3ohi0cJFSy58e50Z9ebQg3+a+n6F5/qquLzmWUzzRjwkpItH JqPqo/plaryGVspOFTQfdoAhGI/Jf5nvxfOe1NT2CT/VSmECjKP3r4BmrzNkJN2eGNcNHu PXNPAJREhJgFfqwXDX5uiWaFD8BbCmN8QujPb9s8u2NKXMSL5P4vzt/QBTKF4FQxEHLwXH AeYUFbCLGbZX2IQTmNuVwnvJu+3g79Gdou6UVu3GPw6gkRmj7v/wW1PRcp8UDQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=RuorBr8k; 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=1732558234; 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; bh=4lYfIPXQsZnd00x6hiDNAYAQUuYmxbA56hgMEAmkKCo=; b=GvTM67tE08+0fsrK2uYAJ0k6s8g2ZBaeXWOG9tjGjH0LFwBeSVyj1CcPzRkIwxCLZGank+ j1SjQnQUgW6NeVpjl82wT8rYLAyX9p8yAlyiodBofr7lR1XEB6NVImWa5ISxXllSBQaasF UeSAAgwZSEm2rDdfB0DZ58c/Y4MZ3vA6ZwGeoGOJR2p3CqM3dnIQXvUW6LsSv9EbaTkZ2p yS+N/wh+yheY+xdexZXOJc2I9ycmKD076UIO+Rg3THIW+dmRAqj11vGLQlrTJDLaa0cAel 23Vttxy4k0Nyh80E3OnAWPHOMncnh6nK/rw5fYODwC836RxPUpw/75VSxY6XNg== 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 E6FD37973F for ; Mon, 25 Nov 2024 19:10:33 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFdWr-0008LD-KR; Mon, 25 Nov 2024 13:09:45 -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 1tFdWo-0008Kc-Ue for emacs-orgmode@gnu.org; Mon, 25 Nov 2024 13:09:43 -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 1tFdWl-0004Oe-Kg for emacs-orgmode@gnu.org; Mon, 25 Nov 2024 13:09:42 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 77AD0240028 for ; Mon, 25 Nov 2024 19:09:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1732558176; bh=+BOHElcenkCXxRj/unsDd934XNb2PejceaB206vQ7J0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=RuorBr8kxeZWSH9AoBpzvwLuhG5RqEe+Zper6rQFxap6evTi4wShGfSTF9dNRsvgE KLoEV8fec/5VWNIzs3yWESov28WdSKVYL2WO8rOrmRrChF7a+wgHK9gjcXD4PLc5VG 4scmxj6lFDj/Nubj2vtdER91n/kIkGJ3Dlq5hqFk12Nh6ygwf2s1W14mx56ul8tn/U DGJ8fDOi+IYQ6nmiZQhuNJrgfcooZtFPqLr5jHA1nedlJZBpJGo/euOkY5vXQFl4c3 aIYZRu2Iq+TQ1QZ9OOpugpWFqbzsomoOrKXHMl7nKBEw3L/xXeEJRYFNOPHRbhLsxx bY243ABHK721A== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4XxtyR6FpDz9rxG; Mon, 25 Nov 2024 19:09:35 +0100 (CET) From: Ihor Radchenko To: Karthik Chikmagalur Cc: stardiviner , Org mode Subject: Re: [PATCH v11] Inline image display as part of a new org-link-preview system In-Reply-To: <87bjy4c895.fsf@gmail.com> References: <6461a84b.a70a0220.b6d36.5d00@mx.google.com> <87tte7wdpj.fsf@gmail.com> <87y135ce4g.fsf@localhost> <87cykbfodz.fsf@gmail.com> <87r08nkhfg.fsf@localhost> <874j5jfy8y.fsf@gmail.com> <875xpxu47h.fsf@localhost> <87h68weovw.fsf@gmail.com> <875xpcks8a.fsf@localhost> <87a5enevy5.fsf@gmail.com> <877c9qeohj.fsf@localhost> <87msimtz88.fsf@gmail.com> <87plnh7azl.fsf@localhost> <87v7x9z7y6.fsf@gmail.com> <87cyjgcf48.fsf@localhost> <87iksqmktm.fsf@gmail.com> <87msi1eo07.fsf@localhost> <87frntmpq4.fsf@gmail.com> <87r075ckql.fsf@gmail.com> <87a5dq9bt9.fsf@localhost> <87bjy4c895.fsf@gmail.com> Date: Mon, 25 Nov 2024 18:11:09 +0000 Message-ID: <87jzcri3pe.fsf@localhost> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" 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_H3=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-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -5.97 X-Spam-Score: -5.97 X-Migadu-Queue-Id: E6FD37973F X-Migadu-Scanner: mx10.migadu.com X-TUID: kxF81edhqS4e --=-=-= Content-Type: text/plain Karthik Chikmagalur writes: > I've attached the latest version of the patchset, with the link > descriptions in the manual fixed for PDF readability. I can't test it > here so please let me know if it looks good. > > I've also rebased the commits onto main. Thanks! See the attached further adjustments to the manual. Also, I found a bug in the new preview system. Consider the following Org file: * This is test :ATTACH: :PROPERTIES: :ID: c4cd9f0c-b1fc-4906-9e34-967564123e64 :END: [[attachment:2024-11-25_19-03.png]][[attachment:2024-11-25_19-03.png]][[attachment:2024-11-25_19-03.png]] If you try to preview images in section, not all the images will be previewed. Furthermore, trying to toggle image previews with point at the links will yield "wrong side of point": 1. Open the file. Make sure that you adjust the links to point to the real files 2. C-c C-x C-v 3. Observe only one link being previewed 4. Move point to link that is not previewed 5. C-c C-x C-v 6. Observe error --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=cleanup.diff diff --git a/doc/org-manual.org b/doc/org-manual.org index 95846b4758..e904b27db2 100644 --- a/doc/org-manual.org +++ b/doc/org-manual.org @@ -11780,20 +11780,19 @@ ** Literal Examples ** Images and link previews :PROPERTIES: -:DESCRIPTION: Preview links in the buffer +:DESCRIPTION: Preview links in the buffer. :END: -Org mode can display previews of hyperlinks (see [[*Hyperlinks]]) -inside Org buffers. By default, only image links[fn::Image links are -=file:= and =attachment:= links to existing image files; Emacs can -only display the linked images listed in ~image-types~ variable] can -be previewed inline, where the images are displayed in place of the -link path. +Org mode can display previews of [[*Hyperlinks][hyperlinks]] inside Org buffers. By +default, only image links[fn::Image links are =file:= and +=attachment:= links to existing image files; Emacs should be able to +display the linked images (see ~image-types~ variable)] can be +previewed inline, where the images are displayed in place of the link +path. -You can customize the previews as described in [[*Adding Hyperlink -preview]]. Link previews do not have to display images -- any kind of -display decoration (see [[info:elisp#Overlay Properties]]) can be -used. +You can customize the previews as described in the [[*Adding Hyperlink +preview]] section. Link previews do not have to display images -- any +kind of [[info:elisp#Overlay Properties][display decoration]] can be used. You can preview the supported link types in the whole buffer, in the current section, active region or at point with the following commands: @@ -11802,12 +11801,11 @@ ** Images and link previews #+kindex: C-c C-x C-v #+findex: org-link-preview - Create inline previews for external links in the active region, if - any; the link at point, if there is such; or in the current section - otherwise. With a prefix argument, clear link previews at point or - in the current entry. With a double prefix argument, preview all - links in the buffer. With triple prefix argument, hide previews for - all links in the buffer. + Create inline previews for external links in the active region, the + link at point or in the current section. With a prefix argument, + clear link previews at point or in the current entry. With a double + prefix argument, preview all links in the buffer. With triple + prefix argument, hide previews for all links in the buffer. By default, only links without descriptions are previewed. You can force displaying previews for all supported links (including @@ -11830,14 +11828,14 @@ ** Images and link previews Assure inline display of external link previews in the whole buffer and refresh them. -- {{{kbd(M-x org-link-preview-region)}}} :: +- (~org-link-preview-region~) :: #+findex: org-link-preview-region Create inline previews for external links in the active region, or the buffer. With a prefix argument, also preview links with a text description part. -- {{{kbd(M-x org-link-preview-clear)}}} :: +- (~org-link-preview-clear~) :: #+findex: org-link-preview-clear Clear external link previews in the active region, or the buffer. @@ -11873,7 +11871,7 @@ *** Images [[./img/a.jpg]] #+end_example -When link previews are displayed as images, the image size and +When [[*Images and link previews][link previews]] are displayed as images, the image size and alignment can be further customized. #+vindex: org-image-actual-width --=-=-= Content-Type: text/plain -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at --=-=-=--