Hi,

attached is a patch adding the :safe predicate to three org-latex configuration variables.

Best, /PA
From 56028db91b31ab72db5b903bee847369a238dbda Mon Sep 17 00:00:00 2001
From: "Pedro A. Aranda" <[email protected]>
Date: Tue, 21 Oct 2025 07:22:49 +0200
Subject: [PATCH] lisp/ox-latex.el: Add :safe predicate to 3 variables

(org-latex-title-command): Make it safe for strings
(org-latex-subtitle-format): idem
(org-latex-subtitle-separate): Make it safe as boolean

Adding the :safe predicate to these variables makes it possible to add
customisations via file or directory-local variables without
triggering extra messages when loading the documents.
---
 lisp/ox-latex.el | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index 6442ff20b..1efc9bb93 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -588,6 +588,7 @@ like that: \"%%\".
 Setting :latex-title-command in publishing projects will take
 precedence over this variable."
   :group 'org-export-latex
+  :safe #'stringp
   :type '(string :tag "Format string"))
 
 (defcustom org-latex-subtitle-format "\\\\\\medskip\n\\large %s"
@@ -597,6 +598,7 @@ which is replaced with the subtitle."
   :group 'org-export-latex
   :version "26.1"
   :package-version '(Org . "8.3")
+  :safe #'stringp
   :type '(string :tag "Format string"))
 
 (defcustom org-latex-subtitle-separate nil
@@ -604,6 +606,7 @@ which is replaced with the subtitle."
   :group 'org-export-latex
   :version "26.1"
   :package-version '(Org . "8.3")
+  :safe #'booleanp
   :type 'boolean)
 
 (defcustom org-latex-toc-command "\\tableofcontents\n\n"
-- 
2.34.1

Reply via email to