From a1f2f6806d94a445c014ecc337ca7dd722e06e5b Mon Sep 17 00:00:00 2001 From: TEC Date: Mon, 2 Jan 2023 02:55:57 +0800 Subject: [PATCH] org-latex-preview: Inhibit fsync when editing SVGs * lisp/org-latex-preview.el (org-latex-preview--svg-make-fg-currentColor): The value of fsync appears questionable at best on modern hardware, and makes little sense for small files where the performance overhead is significant. Thus, it makes sense to inhibit fsync when editing the generated SVGs. --- lisp/org-latex-preview.el | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/lisp/org-latex-preview.el b/lisp/org-latex-preview.el index 93abb07c1..28c5ff3ed 100644 --- a/lisp/org-latex-preview.el +++ b/lisp/org-latex-preview.el @@ -1162,15 +1162,16 @@ EXTENDED-INFO, and displayed in the buffer." The foreground color is guessed to be the first specified fill color, which appears to be a reliable heuristic from a few tests with the output of dvisvgm." - (with-temp-buffer - (insert-file-contents (plist-get svg-fragment :path)) - (goto-char (point-min)) - (when (re-search-forward "