Hi Ihor,
A thousand apologies for my horrible carelessness with the parentheses.
I should have checked the code. Here goes the patch again corrected. I
hope it's alright now.
Ihor Radchenko writes:
> Also, the original code contained the clause:
> (or (get lang from the alist1)
> (get lang from the alist2)
> lang ; Fallback to provided language if not known.
> )
>
> Your variant does not have the fallback part. Is it intentional?
Yes, I removed it because I thought it was not necessary, because after
all the user must put a supported language as the value of #+language.
Anyway, in case it breaks something backwards I have replaced it. Now
the or expression is:
(or (nth 1 (assoc-string lang org-latex-language-alist t))
lang)
Best regards,
Juan Manuel
>From 483cf69e0ca56c560c3bd53db13887a63d529ec9 Mon Sep 17 00:00:00 2001
From: Juan Manuel Macias <[email protected]>
Date: Tue, 26 Jul 2022 18:01:52 +0200
Subject: [PATCH] lisp/ox-latex.el: Remove Babel and Polyglossia alists
* (org-latex--format-spec): The new variable is now `org-latex-language-alist'
---
lisp/ox-latex.el | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index 121a3f84c..14728f0ba 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -1861,8 +1861,10 @@ INFO is a plist used as a communication channel."
"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))
+ ;; Here it would suffice to obtain the second
+ ;; element, which always returns the name
+ ;; language name in `org-latex-language-alist'
+ (or (nth 1 (assoc-string lang org-latex-language-alist t))
lang))))
`((?a . ,(org-export-data (plist-get info :author) info))
(?t . ,(org-export-data (plist-get info :title) info))
--
2.37.1