Juan Manuel Macías <maciasch...@posteo.net> writes:

> Here is the new patch. I have realized that it is not necessary to put a
> cond, since in this case it is only necessary to obtain the name of the
> language for the metadata, so this new patch is simpler.

Thanks for the update!

The patch has some misplaced parenthesis.

> -  (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))
> +                        ;; Here it would suffice to obtain the second
> +                        ;; element, which always returns the name
> +                        ;; language name in `org-latex-language-alist'
> +                     (nth 1 (assoc-string lang org-latex-language-alist 
> t))))))

Your (nth 1 ...) sexp is inside the let definition:
(let ((lang ...)
      (nth 1 ..))
  nil)

Please pay attention to the compiler warnings.

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?

Best,
Ihor

Reply via email to