emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: Karthik Chikmagalur <karthikchikmagalur@gmail.com>
Cc: stardiviner <numbchild@gmail.com>, Org mode <emacs-orgmode@gnu.org>
Subject: Re: [PATCH v11] Inline image display as part of a new org-link-preview system
Date: Mon, 25 Nov 2024 18:11:09 +0000	[thread overview]
Message-ID: <87jzcri3pe.fsf@localhost> (raw)
In-Reply-To: <87bjy4c895.fsf@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1034 bytes --]

Karthik Chikmagalur <karthikchikmagalur@gmail.com> 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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: cleanup.diff --]
[-- Type: text/x-patch, Size: 3508 bytes --]

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

[-- Attachment #3: Type: text/plain, Size: 225 bytes --]



-- 
Ihor Radchenko // yantar92,
Org mode contributor,
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>

  reply	other threads:[~2024-11-25 18:10 UTC|newest]

Thread overview: 85+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-15  3:28 [PATCH] add a function to only refresh inline images under current headline instead of global buffer Christopher M. Miles
2023-05-15 11:08 ` Ihor Radchenko
2023-05-15 13:01   ` Christopher M. Miles
2023-05-15 14:00   ` [PATCH v2] " Christopher M. Miles
2023-05-16  9:17     ` Ihor Radchenko
2023-05-16 12:18       ` Christopher M. Miles
2023-07-24 11:25         ` Ihor Radchenko
2023-08-01  4:40           ` [PATCH v3] " Christopher M. Miles
2023-08-01  8:04             ` Ihor Radchenko
2023-08-01 12:17               ` [PATCH v3.1] " Christopher M. Miles
2023-08-01 14:09                 ` Ihor Radchenko
2023-08-01 15:22                   ` Christopher M. Miles
2023-08-01 15:46                   ` Christopher M. Miles
2023-08-02 16:08                     ` Ihor Radchenko
2023-08-04  6:30                       ` Christopher M. Miles
2023-08-02  7:26                 ` Ihor Radchenko
2023-08-02 15:44                   ` Christopher M. Miles
2023-08-04  8:20                     ` Ihor Radchenko
2023-08-05  5:28                       ` [PATCH v3.2] " Christopher M. Miles
2024-07-22 10:46                         ` Ihor Radchenko
2024-08-01 22:58                           ` [PATCH v4.0] " stardiviner
     [not found]                           ` <66a8b73b.170a0220.383476.996e@mx.google.com>
2024-08-12 10:18                             ` Ihor Radchenko
2024-08-14  2:04                               ` stardiviner
2024-08-18 10:27                                 ` Ihor Radchenko
2024-08-20  2:02                                   ` Karthik Chikmagalur
2024-08-20 15:43                                     ` Karthik Chikmagalur
2024-08-20 18:19                                       ` Ihor Radchenko
2024-08-20 19:46                                         ` Karthik Chikmagalur
2024-08-22 13:19                                           ` Ihor Radchenko
2024-08-23  6:04                                             ` Karthik Chikmagalur
2024-08-23 23:36                                             ` [PATCH v1] Inline image display as part of a new org-link-preview system Karthik Chikmagalur
2024-08-24  1:00                                               ` Karthik Chikmagalur
2024-08-31 14:22                                               ` Ihor Radchenko
2024-08-31 16:41                                                 ` Karthik Chikmagalur
2024-08-31 16:53                                                   ` Ihor Radchenko
2024-08-31 22:37                                                     ` [PATCH v2] " Karthik Chikmagalur
2024-09-01 13:06                                                       ` Ihor Radchenko
2024-09-02 20:13                                                         ` [PATCH v3] " Karthik Chikmagalur
2024-09-08  7:43                                                           ` Ihor Radchenko
2024-09-09  3:21                                                             ` Karthik Chikmagalur
2024-09-09  6:06                                                               ` Ihor Radchenko
2024-09-09  6:30                                                                 ` Karthik Chikmagalur
2024-09-09 16:47                                                                   ` Ihor Radchenko
2024-09-09 19:14                                                                     ` Karthik Chikmagalur
2024-09-10 16:57                                                                       ` Ihor Radchenko
2024-09-10 19:53                                                                         ` Karthik Chikmagalur
2024-09-15  7:51                                                                           ` Ihor Radchenko
2024-09-09 21:45                                                                 ` Karthik Chikmagalur
2024-09-10 16:58                                                                   ` Ihor Radchenko
2024-09-10 17:38                                                                     ` Karthik Chikmagalur
2024-09-10 18:34                                                                       ` Ihor Radchenko
2024-09-10 19:43                                                             ` Karthik Chikmagalur
2024-09-15  8:12                                                               ` Ihor Radchenko
2024-09-15 20:50                                                                 ` Karthik Chikmagalur
2024-09-15 21:57                                                                 ` [PATCH v4] " Karthik Chikmagalur
2024-09-17 18:16                                                                   ` Ihor Radchenko
2024-09-18  1:44                                                                     ` [PATCH v5] " Karthik Chikmagalur
2024-09-21 10:11                                                                       ` Ihor Radchenko
2024-09-22 22:00                                                                         ` [PATCH v6] " Karthik Chikmagalur
2024-10-03 17:03                                                                           ` Ihor Radchenko
2024-10-08  0:07                                                                             ` [PATCH v7] " Karthik Chikmagalur
2024-10-10 17:15                                                                               ` Ihor Radchenko
2024-10-10 21:23                                                                                 ` Karthik Chikmagalur
2024-10-12  8:15                                                                                   ` Ihor Radchenko
2024-10-28  6:13                                                                                     ` [PATCH v8] " Karthik Chikmagalur
2024-10-28 18:16                                                                                       ` Ihor Radchenko
2024-10-28 21:53                                                                                         ` [PATCH v9] " Karthik Chikmagalur
2024-10-29 18:46                                                                                           ` Ihor Radchenko
2024-10-29 20:45                                                                                             ` [PATCH v10] " Karthik Chikmagalur
2024-10-30 17:32                                                                                               ` Ihor Radchenko
2024-10-30 19:50                                                                                                 ` Karthik Chikmagalur
2024-10-31 18:16                                                                                                   ` Ihor Radchenko
2024-11-14  5:43                                                                                                     ` Karthik Chikmagalur
2024-11-14 17:14                                                                                                       ` Ihor Radchenko
2024-11-14 22:10                                                                                                         ` Karthik Chikmagalur
2024-11-21  3:46                                                                                                           ` Karthik Chikmagalur
2024-11-23 16:04                                                                                                             ` Ihor Radchenko
2024-11-25  3:17                                                                                                               ` [PATCH v11] " Karthik Chikmagalur
2024-11-25 18:11                                                                                                                 ` Ihor Radchenko [this message]
2024-11-26  1:08                                                                                                                   ` Karthik Chikmagalur
2024-11-26  2:08                                                                                                                   ` [PATCH v12] " Karthik Chikmagalur
2024-11-23 16:11                                                                                                           ` [PATCH v10] " Ihor Radchenko
2024-08-18 10:34                                 ` [FR] Automatically display images in resutls of evaluation (was: [PATCH v4.0] Re: [PATCH] add a function to only refresh inline images under current headline instead of global buffer) Ihor Radchenko
     [not found]                                   ` <66c54dfc.a70a0220.3c823a.2899@mx.google.com>
2024-08-22 13:06                                     ` [FR] Automatically display images in resutls of evaluation Ihor Radchenko
     [not found]                                       ` <66c89411.170a0220.3255c1.0cd5@mx.google.com>
     [not found]                                         ` <87zfor7b04.fsf@localhost>
     [not found]                                           ` <CAL1eYuLOsaS43ahueN4uWiCn+Ykp=p_-t9dzAypKdy1en_53BQ@mail.gmail.com>
2024-09-15 13:33                                             ` [PATCH v3] " Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87jzcri3pe.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=karthikchikmagalur@gmail.com \
    --cc=numbchild@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).