Hi,

just to allow users to set `org-latex-compiler' from the file or directory
local variables (too).

Best, /PA
-- 
Fragen sind nicht da, um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler

"Sagen's Paradeiser" (ORF: Als Radiohören gefährlich war) => write BE!
Year 1 of the New Koprocracy
From 953ab0aa256c6765d4fc61ba35e88b3afe04df94 Mon Sep 17 00:00:00 2001
From: "Pedro A. Aranda" <[email protected]>
Date: Mon, 22 Dec 2025 08:11:10 +0100
Subject: [PATCH] lisp/ox-latex.el: Set :safe predicate for
 `org-latex-compiler'

lisp/ox-latex.el: Set :safe predicate for (org-latex-compiler)
according to its :type definition
---
 lisp/ox-latex.el | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index e49af206e..0bb30915a 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -1427,7 +1427,12 @@ Can also be set in buffers via #+LATEX_COMPILER.  See also
 	  (const :tag "LuaLaTeX" "lualatex")
 	  (const :tag "Unset" ""))
   :version "26.1"
-  :package-version '(Org . "9.0"))
+  :package-version '(Org . "9.0")
+  :safe (lambda (s)
+          (and (stringp s)              ; must be a string
+               ;; either an empty string or one of the supported compilers
+               (or (length= s 0)
+                   (member s org-latex-compilers)))))
 
 (defconst org-latex-compilers '("pdflatex" "xelatex" "lualatex")
   "Known LaTeX compilers.
-- 
2.34.1

Reply via email to