forked from mirrors/org-mode
org-latex-preview: Speed up texfile creation time
* lisp/org-latex-preview.el (org-latex-preview--create-tex-file): Speed up texfile creation time by inhibiting fsync and setting the `coding-system-for-write' explicitly. Times are reduced by about 40-50%.
This commit is contained in:
parent
0f1d2f0ca0
commit
b9f937bb2d
|
@ -1429,7 +1429,9 @@ The path of the created LaTeX file is returned."
|
|||
(format "\n\\setlength{\\textwidth}{%s}\n" w))
|
||||
((and (floatp w) (<= 0.0 w 1.0))
|
||||
(format "\n\\setlength{\\textwidth}{%s\\paperwidth}\n" w))))
|
||||
"\n\\usepackage[active,tightpage,auctex]{preview}\n")))
|
||||
"\n\\usepackage[active,tightpage,auctex]{preview}\n"))
|
||||
(write-region-inhibit-fsync t)
|
||||
(coding-system-for-write buffer-file-coding-system))
|
||||
(with-temp-file tex-temp-name
|
||||
(insert (if-let ((format-file
|
||||
(and org-latex-preview-use-precompilation
|
||||
|
|
Loading…
Reference in New Issue