Hi Ihor and Kai,

Ihor Radchenko writes:

> Hmm. You are actually right.
> Juan, can you please take a look. It looks like you missed
> "org-latex--format-spec" in the patch. It should use the new
> org-latex-language-alist variable instead.

Attached a new patch to fix (I hope) the org-latex-language-alist issue
in org-latex--format-spec.

Best regards,

Juan Manuel 

>From 95ce88336f6d2106968250379767ce2fe690fe2c Mon Sep 17 00:00:00 2001
From: Juan Manuel Macias <maciasch...@posteo.net>
Date: Sat, 23 Jul 2022 17:42:50 +0200
Subject: [PATCH] lisp/ox-latex.el: Fix obsolete variables for babel and
 polyglossia

* (org-latex--format-spec): Use the new variable `org-latex-language-alist'
---
 lisp/ox-latex.el | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index 6cd751409..ee059d5ce 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -1860,10 +1860,12 @@ INFO is a plist used as a communication channel."
 (defun org-latex--format-spec (info)
   "Create a format-spec for document meta-data.
 INFO is a plist used as a communication channel."
-  (let ((language (let ((lang (plist-get info :language)))
-		    (or (cdr (assoc-string lang org-latex-babel-language-alist t))
-			(nth 1 (assoc-string lang org-latex-polyglossia-language-alist t))
-			lang))))
+  (let ((language (let* ((lang (plist-get info :language))
+		         (l (assoc lang org-latex-language-alist)))
+                    (cond ((and (consp l) (= (length l) 4))
+	                   (nth 2 (assoc-string lang org-latex-language-alist t)))
+	                  ((and (consp l) (< (length l) 4))
+	                   (nth 1 (assoc-string lang org-latex-language-alist t)))))))
     `((?a . ,(org-export-data (plist-get info :author) info))
       (?t . ,(org-export-data (plist-get info :title) info))
       (?s . ,(org-export-data (plist-get info :subtitle) info))
-- 
2.37.1

Reply via email to