From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id KI7SHPvW32JlTgEAbAwnHQ (envelope-from ) for ; Tue, 26 Jul 2022 13:58:51 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id CPLkG/vW32LE/gAAG6o9tA (envelope-from ) for ; Tue, 26 Jul 2022 13:58:51 +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 1F5DAAF91 for ; Tue, 26 Jul 2022 13:58:51 +0200 (CEST) Received: from localhost ([::1]:38100 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oGJD8-0006om-9j for larch@yhetil.org; Tue, 26 Jul 2022 07:58:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55842) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oGJCJ-0006oe-T5 for emacs-orgmode@gnu.org; Tue, 26 Jul 2022 07:57:59 -0400 Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]:50904) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oGJCF-0003Ix-4t for emacs-orgmode@gnu.org; Tue, 26 Jul 2022 07:57:59 -0400 Received: by mail-pj1-x1032.google.com with SMTP id jw17so857129pjb.0 for ; Tue, 26 Jul 2022 04:57:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=iq+/9hceCQHduVITG7bXdT3YduApFtp46MoCmYuxL2w=; b=HkeVtS3mw5zyvFtEkrC1kYX0fQqVtZiVj6Ls70mFYN/YuhSFLq1CAX/X8EPKDu+kvs iJsJuwu56cpuiKCvqe8YNAKHVnKQOXyezU5bH7WAeS8fyW7mGtvwZBLM+DII7P3jvN2Q dptuDK+NVQo+rLaWcCBYO/vQ8lr4NuXnDZrtk5shubX24Peo+DXn8J+D3eWc6ugK9K8J BD+VWsNSRjTVbkLKl8YEY+lMNKzoiisXioidJKWFXxXhoNzcAYCh/bHvHfzXLVemgziM fI4xkPzJCmlnjwjs64pMuo34rMersYhHGnZ709WRAvSyxxMsL3VGiacxko/NrAqThIiF Clhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=iq+/9hceCQHduVITG7bXdT3YduApFtp46MoCmYuxL2w=; b=iGQ19Gb/dTKoPUCje2jkRtB1UG9e4dMKF7uMBVhIKg+PQDoC+WM/yrhLV6HpQ7bFyH UyKNdsIiNl01hogjQ4Xd7lKHnOm4P5j/MxkpWCIHLx4SVyJBBwrvuayunw3epl3Hmlz/ SaeERoorhaT0wfPCvdMzE8rOBaoOmgG6N7AVGLzMe6Ts3UIWmx+jLZcL70oQC2eKS609 r0oqCr0yHNoj9oOSS+MMwznlidPesZH/SkdywL82ceBWxF0ahFucrVFwH7uc0ZRMzfF6 L2aDPaxkE6QA9CQR1dCsvYVmRT23wVPXM24y5m6MNWCxwxWihCo9W7QF+nxTtucIhzel xmjw== X-Gm-Message-State: AJIora9GmoCiSoWWCSw5YPvG8CpVLwve63oQVI9uSiK2T5AWUtOT1omX FzKIOEF0lQX2w49HtXuj7no= X-Google-Smtp-Source: AGRyM1sX8HRazoA3Et108tYLYd5lLHcAyxMsLjoLfMW/oj3DrCIBmeqmHXFZIe0Gy5u12h65cvlRJw== X-Received: by 2002:a17:90b:380b:b0:1f2:5514:9615 with SMTP id mq11-20020a17090b380b00b001f255149615mr19572672pjb.171.1658836673834; Tue, 26 Jul 2022 04:57:53 -0700 (PDT) Received: from localhost ([2409:8a70:217:4f80:8ec6:81ff:fe70:339d]) by smtp.gmail.com with ESMTPSA id z14-20020a6553ce000000b003fbb455040dsm10223088pgr.84.2022.07.26.04.57.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Jul 2022 04:57:52 -0700 (PDT) From: Ihor Radchenko To: Juan Manuel =?utf-8?Q?Mac=C3=ADas?= Cc: orgmode Subject: Re: BUG Re: [PATCH] ox-latex.el: Unify in one single list Babel and Polyglossia languages alists In-Reply-To: <874jz6rbo7.fsf@posteo.net> References: <87pmhw9bfu.fsf@localhost> <87mtczaozb.fsf@localhost> <4F8FB342-420C-4A76-833F-4186E027655B@mit.edu> <87czdvannh.fsf@localhost> <87sfmrq0z2.fsf@posteo.net> <87a68zdls1.fsf@localhost> <874jz6rbo7.fsf@posteo.net> Date: Tue, 26 Jul 2022 19:58:57 +0800 Message-ID: <87y1wgaxvi.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::1032; envelope-from=yantar92@gmail.com; helo=mail-pj1-x1032.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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=1658836731; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=iq+/9hceCQHduVITG7bXdT3YduApFtp46MoCmYuxL2w=; b=i4G7HMCiYpMzjm9M6uuiAOH8vEr9TI527dR5q+j6/QNRTcQtdJcFo5l+NjoM/gCEbwsj10 wEhW6L1fUXV9xECAGCfuhoqJ4gbrDb4noiV7mHPMwUeU3ARzfamZOaFdZ+C0JVBAclwH1n 4f7d/7ZfnnZYYzmGBlcDQ6K5H5qXrVzwUjpCY6LUo2/c1LM0q7Mi7fTYX9YPzgERM7/8QM XH0m6LdHdrHAnDRQCM7yMNgHqQZXOT7sC6mQcuZk8iVe9A6lUAbnBwd8qzygN/FuvRrliA z0YxM/DDucOsqwqi+alGnZnWpDskvYQKnWo086kfQx33/RMOT4Ube5HnZkqGrg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1658836731; a=rsa-sha256; cv=none; b=ptxSlsrBWICiNttBqs+JGbBekNvjPLvXWZUbqKiGRR4bW2Hl8buKa3nsLdHeW+Twv/xjxg eQZpvjJq4bF7awpypw+4lchFhE2/FAYN31+O/iE78KEaNNbxVkfKY9bj16ZuFo8sUetNje 5KnDHD3+Jh3EUT4slDjDJUdTL3g7hHtUCbKI08cmvfKF8OWERf/V2tofhXz3mzIymnsAl0 rWLbw3ZrK2ZnwE43WJrvLMTZDuHFRQncvC3xsZMkTSRINS+W23eKDsSNlkJmAo4+v0YjSx IkFs4AkPwlj5kPeRs6MU+g5GsG8/CbLcMT3fuiTtHeyFRayH0yS2jdZUxwM0kg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=HkeVtS3m; dmarc=pass (policy=none) header.from=gmail.com; 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: -8.43 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=HkeVtS3m; dmarc=pass (policy=none) header.from=gmail.com; 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: 1F5DAAF91 X-Spam-Score: -8.43 X-Migadu-Scanner: scn0.migadu.com X-TUID: mU6UU/ZM1vdT Juan Manuel Mac=C3=ADas 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