Hi, I would like to submit a patch. (Attached.)
Best, Asilata -- Asilata Bapat (she/her)
From 64409e1c139eb0853fa61155b2dbe743bd4bfacc Mon Sep 17 00:00:00 2001 From: "Asilata Bapat (peanut)" <[email protected]> Date: Fri, 23 Jan 2026 23:06:48 +1100 Subject: [PATCH] lisp/ox-html.el: Fix bug in org-html-format-latex * lisp/ox-html.el (org-html-format-latex): Set cache-dir to the empty string if INFO does not contain the property :output-file. If the function file-name-directory is called with the argument nil, it raises an error while setting cache-dir. This commit fixes this bug. TINYCHANGE --- lisp/ox-html.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ox-html.el b/lisp/ox-html.el index ae700b6e6..97db958e8 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -3098,7 +3098,7 @@ INFO is a plist containing export properties." (concat (file-name-as-directory org-preview-latex-image-directory) (file-name-sans-extension (file-name-nondirectory bfn))) - cache-dir (file-name-directory (plist-get info :output-file))) + cache-dir (file-name-directory (or (plist-get info :output-file) ""))) ;; Re-create LaTeX environment from original buffer in ;; temporary buffer so that dvipng/imagemagick can properly ;; turn the fragment into an image. -- 2.52.0
signature.asc
Description: PGP signature
