emacs-orgmode
[Top][All Lists]
Advanced

[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: Mon, 09 Sep 2024 14:45: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.

Another problem: this top level chunk no longer works

(when interactive?
  (let ((new (org-link-preview--get-overlays beg end)))
    (message
     (if new
         (format "[%s] %d images displayed inline %s"
                 scope (length new)
                 (if include-linked "(including images with description)"
                   ""))
       (format "[%s] No images to display inline" scope)))))

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.

Karthik



reply via email to

[Prev in Thread] Current Thread [Next in Thread]