[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3] Inline image display as part of a new org-link-preview sy
From: |
Karthik Chikmagalur |
Subject: |
Re: [PATCH v3] Inline image display as part of a new org-link-preview system |
Date: |
Tue, 10 Sep 2024 10:38:48 -0700 |
>> Another problem: this top level chunk no longer works
>>
>> [...]
>>
>> since the previews are place asynchronously. It always reports "no
>> images to display inline". Should I remove this messaging, or find a
>> way to run this from the final async chunk? The code gets a little
>> convoluted when I do the latter.
>
> I am a bit confused. Isn't `org-link-preview--get-overlays' counting
> overlays? And the overlays should be created before async preview is
> complete, right? Or do I miss something?
Currently I only add the overlay to `org-link-preview-overlays' if/when
the preview is successful. `org-link-preview--get-overlays' counts
overlays in this buffer-local list.
If I add overlays to `org-link-preview-overlays' when they are created,
1. All previews that (eventually, asynchronously) fail will be reported
as successful by the message.
2. `org-link-preview-overlays' will be populated with overlays for
failed previews, leading to inconsistent behavior when doing other
things, like toggling a link preview at point.
These inconsistencies might still be worth it since the code will be
much more confusing and harder to maintain if everything (including user
messaging) is done via callbacks.
Karthik
- Re: [PATCH v3] Inline image display as part of a new org-link-preview system, (continued)
- Re: [PATCH v3] Inline image display as part of a new org-link-preview system, Karthik Chikmagalur, 2024/09/08
- Re: [PATCH v3] Inline image display as part of a new org-link-preview system, Ihor Radchenko, 2024/09/09
- Re: [PATCH v3] Inline image display as part of a new org-link-preview system, Karthik Chikmagalur, 2024/09/09
- Re: [PATCH v3] Inline image display as part of a new org-link-preview system, Ihor Radchenko, 2024/09/09
- Re: [PATCH v3] Inline image display as part of a new org-link-preview system, Karthik Chikmagalur, 2024/09/09
- Re: [PATCH v3] Inline image display as part of a new org-link-preview system, Ihor Radchenko, 2024/09/10
- Re: [PATCH v3] Inline image display as part of a new org-link-preview system, Karthik Chikmagalur, 2024/09/10
- Re: [PATCH v3] Inline image display as part of a new org-link-preview system, Ihor Radchenko, 2024/09/15
- Re: [PATCH v3] Inline image display as part of a new org-link-preview system, Karthik Chikmagalur, 2024/09/09
- Re: [PATCH v3] Inline image display as part of a new org-link-preview system, Ihor Radchenko, 2024/09/10
- Re: [PATCH v3] Inline image display as part of a new org-link-preview system,
Karthik Chikmagalur <=
- Re: [PATCH v3] Inline image display as part of a new org-link-preview system, Ihor Radchenko, 2024/09/10
- Re: [PATCH v3] Inline image display as part of a new org-link-preview system, Karthik Chikmagalur, 2024/09/10
- Re: [PATCH v3] Inline image display as part of a new org-link-preview system, Ihor Radchenko, 2024/09/15
- Re: [PATCH v3] Inline image display as part of a new org-link-preview system, Karthik Chikmagalur, 2024/09/15
- Re: [PATCH v4] Inline image display as part of a new org-link-preview system, Karthik Chikmagalur, 2024/09/15
- Re: [PATCH v4] Inline image display as part of a new org-link-preview system, Ihor Radchenko, 2024/09/17
- Re: [PATCH v5] Inline image display as part of a new org-link-preview system, Karthik Chikmagalur, 2024/09/17
- Re: [PATCH v5] Inline image display as part of a new org-link-preview system, Ihor Radchenko, 2024/09/21
- Re: [PATCH v6] Inline image display as part of a new org-link-preview system, Karthik Chikmagalur, 2024/09/22