org-latex-preview: Run dvipng concurrently

* lisp/org-latex-preview.el (org-create-formula-image-async): When using
dvipng with the "--follow" flag, image processing can occur
concurrently, so we may as well check for this case and start it
concurrently when this occurs.
This commit is contained in:
TEC 2022-12-28 02:11:03 +08:00
parent 82ac33c1d7
commit c230fef02b
Signed by: tec
SSH Key Fingerprint: SHA256:eobz41Mnm0/iYWBvWThftS0ElEs1ftBr6jamutnXc/A
1 changed files with 5 additions and 2 deletions

View File

@ -584,8 +584,11 @@ MOVEFILES."
(org-latex-preview--tex-compile-async extended-info))
(img-extract-async
(org-latex-preview--image-extract-async extended-info)))
(plist-put (cdr tex-compile-async) :success img-extract-async)
(plist-put (cdr tex-compile-async) :failure img-extract-async)
(if (and (eq processing-type 'dvipng)
(member "--follow" (car img-extract-async)))
(apply #'org-async-call img-extract-async)
(plist-put (cdr tex-compile-async) :success img-extract-async)
(plist-put (cdr tex-compile-async) :failure img-extract-async))
(plist-put (cdr img-extract-async) :success
#'org-latex-preview--cleanup-callback)
(apply #'org-async-call tex-compile-async))))