From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id YPEfDGEt3WJwAgAAbAwnHQ (envelope-from ) for ; Sun, 24 Jul 2022 13:30:41 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id SCYJC2Et3WKhxAAAG6o9tA (envelope-from ) for ; Sun, 24 Jul 2022 13:30:41 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 504A416837 for ; Sun, 24 Jul 2022 13:30:40 +0200 (CEST) Received: from localhost ([::1]:47320 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oFZol-0006Eb-EG for larch@yhetil.org; Sun, 24 Jul 2022 07:30:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48750) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFZo3-00069b-GN for emacs-orgmode@gnu.org; Sun, 24 Jul 2022 07:29:55 -0400 Received: from mout02.posteo.de ([185.67.36.66]:57293) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFZo1-0008Gx-CS for emacs-orgmode@gnu.org; Sun, 24 Jul 2022 07:29:55 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 2944B240107 for ; Sun, 24 Jul 2022 13:29:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1658662191; bh=p/c+d3BifgCoqHcMxKOYMAk8xR6cIgZiOCYYrqMPGtA=; h=From:To:Cc:Subject:Date:From; b=oMVXPYYf7DQmA/REZjMToDwfNbE9mmMtZW0yvgVilEDlhUCzgP6ovHVbc245c3m2T q2+6ULWMlXPeAflL/CbDSryeIKzbQJFmpW+lyvfWf0h9nhs1xXWZfwsauYQ7gndKyQ HrkT+mSkQhX412G+MxOZB0bBpYDaH8CB6Q7EHhoZJFGpSX/E8SofbfwiS/uY/W/AaG rtyyRvXakwvz9Cp721xh+V4fJnZO463Z/7IMhTmUyJEyKkGhnlEL6HOBveLAypv/Uz pvFKZQToI1Q8ScKevDlsxn3+Me3MnlXkZv6QL95F1+0Mkl1AsMq98nynH+pxokPEL8 MPU2sYeV7wtfw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4LrLYm6vMLz6tlh; Sun, 24 Jul 2022 13:29:46 +0200 (CEST) From: =?utf-8?Q?Juan_Manuel_Mac=C3=ADas?= To: Ihor Radchenko Cc: orgmode Subject: Re: BUG Re: [PATCH] ox-latex.el: Unify in one single list Babel and Polyglossia languages alists References: <87pmhw9bfu.fsf@localhost> <87mtczaozb.fsf@localhost> <4F8FB342-420C-4A76-833F-4186E027655B@mit.edu> <87czdvannh.fsf@localhost> <87sfmrq0z2.fsf@posteo.net> <87a68zdls1.fsf@localhost> Date: Sun, 24 Jul 2022 11:29:44 +0000 In-Reply-To: <87a68zdls1.fsf@localhost> (Ihor Radchenko's message of "Sun, 24 Jul 2022 15:15:10 +0800") Message-ID: <874jz6rbo7.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=185.67.36.66; envelope-from=maciaschain@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1658662240; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=IpFKH3ueZ+pbUnr+IThOVjE+eebmjglCDqj6tNaTMEc=; b=HBZg2iUoPdrPUIMYWOnLeTVhwbtUmfqhWePKAqtxQhlaPeRe+8hzBZZVkplfcbhZEDhOXo LTOCk1Hk7CRaPDAXLEPCY1an+Y4n0dGElD7Gw5emEm92mfDX9/e7Fn74zC4zLlp9fjdHGm f1hWSY3485OaG4E/83AbEw/EcwwBuECHT1H5WahjoyZ7p3UM+/R8kvBwbOVt0bP/kKcXEW wxhEiAalKyjOKOo1kfbeSIGsiJnsDX1Xi9UkNdHi64H3JxQruEDGhC0kBLj/8UwtDzH3xD yGg5PQ0bIuDCReEW5fIzP2UDZOsvTsCx8lb4OjYl99px17WXiX7VdQoI9KGe+g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1658662240; a=rsa-sha256; cv=none; b=IirsAbhH2AWKinGAZP3DdSx2SwRplqzzq1LdFpuSDqoC+FiG2f//X5ibjhWzspGua8EVWJ IDlJCEcxQ5NRxpY/Pi0rwu+URA3+g6H419dbFPMmDJE1E1fsR8RZE/FEsWrXRoT4k7hfJm /nViFksBdfJfFKLpsmMZjEQsIrPeLq1oAkFkCcVEwhxJ7cdzeTRIz5Mi97XCHhcqnRXFRi TKGWw2Z7TGoVnrBZo/H3Ppvsja/mgB20oxrm/V6WTnoMX33Bf08qKCnf4TIcSv1hAvN/dW MyQ9LD07vbNos5yAfuS1Kdpcy9s+X+MXczDiB9SNapEv3mOXcEgkesQZ4Hxcrg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=oMVXPYYf; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.13 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=oMVXPYYf; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 504A416837 X-Spam-Score: -4.13 X-Migadu-Scanner: scn1.migadu.com X-TUID: eDm1oFKmY2L/ --=-=-= Content-Type: text/plain Ihor Radchenko writes: > Can you please add the comments, similar to what I requested earlier. > These magic length of 4 may be hard to grasp otherwise. Hi Ihor, 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. Anyway, I think I'm going to prioritize working on a new org-latex-language-alist that is a plist, to avoid all this stuff about numbers and lengths... Best regards, Juan Manuel --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-lisp-ox-latex.el-Fix-obsolete-variables-for-babel-an.patch >From 7f3ddd0d2e6e06becd0d43575be88b77b8d699a4 Mon Sep 17 00:00:00 2001 From: Juan Manuel Macias Date: Sun, 24 Jul 2022 13:20:25 +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 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index 6cd751409..aea602982 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -1860,10 +1860,11 @@ 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)) + ;; 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)))))) `((?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 --=-=-=--