[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: |
Sun, 08 Sep 2024 23:30:55 -0700 |
>> Do you mean something like this?
>>
>> (while (re-search-forward org-link-any-re end t)
>> ;; Make overlay ov here
>> ;; Find path, link and preview-func here
>>
>> (push (list ov preview-func path link) previews-remaining))
>>
>> (dolist (preview-data-chunk (seq-partition previews-remaining 6))
>> (run-with-idle-timer
>> ...
>> Where the chunk size (6) and the idle time (0.10 seconds) will be
>> customizable.
>
> Yes.
Okay. There's one more issue to resolve. An asynchronous preview will
return t but no preview is placed yet. If the preview then fails when
the callback runs, we will have an overlay without a preview that hasn't
been cleaned up. How do you suggest handling this case?
The only thing I can think of is that the async preview-func should call
org-link-preview-clear on the failed preview by itself, and we should
include this expectation in the org-link-parameters documentation.
Karthik
- Re: [PATCH v2] Inline image display as part of a new org-link-preview system, Ihor Radchenko, 2024/09/01
- Re: [PATCH v3] Inline image display as part of a new org-link-preview system, Karthik Chikmagalur, 2024/09/02
- Re: [PATCH v3] Inline image display as part of a new org-link-preview system, Ihor Radchenko, 2024/09/08
- 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 <=
- 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, 2024/09/10
- 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