Karthik Chikmagalur <[email protected]> writes: >> Next step - ox-latex. > > I've redone the precompilation logic to be simpler to follow, and > eliminated some redundant code. Pasting from the relevant commit > message here (4a183344cadb1a652ab80aeb235457900d46df96): > ...
Further comments. > (setf (buffer-local-value > 'org-latex-precompile (get-buffer (plist-get > info :input-buffer))) > nil) :input-buffer does not always exist. In particular, when exporting using `org-export-data' directly. > (defcustom org-latex-precompile nil It is defined after it is used. > (defvar org-latex-precompile-command Should it be defcustom? In any case, the docstring is not sufficient to understand all the %X inside. > (preamble-hash > (sha1 (concat preamble > (plist-get info :latex-compiler) ; > (alist-get ?l spec) > (if tempfile-p "-temp" default-directory)))) This code is used twice. It will be the cleanest to factor it out into dedicated internal helper function. > temporary-file-directory Let's prefer (temporary-file-directory) over temporary-file-directory > (when-let ((dump-file when-let* > (default-directory > (if tempfile-p temporary-file-directory default-directory)) > ... > (org-latex--precompile-preamble > info preamble > (expand-file-name preamble-hash temporary-file-directory) > spec) This looks sus. Do you really want to pass (expand-file-name preamble-hash temporary-file-directory) even when tempfile-p is nil? -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>
