From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 CO+lMLEp1GLmqAAAbAwnHQ (envelope-from ) for ; Sun, 17 Jul 2022 17:24:33 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id MLxgMLEp1GJOZwAAauVa8A (envelope-from ) for ; Sun, 17 Jul 2022 17:24:33 +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 E77EC4092E for ; Sun, 17 Jul 2022 17:22:50 +0200 (CEST) Received: from localhost ([::1]:33670 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oD5Zo-00013w-8e for larch@yhetil.org; Sun, 17 Jul 2022 10:48:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45524) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oD5ZB-00013W-JS for emacs-orgmode@gnu.org; Sun, 17 Jul 2022 10:48:17 -0400 Received: from mout02.posteo.de ([185.67.36.66]:60531) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oD5Z7-0004Nv-Hg for emacs-orgmode@gnu.org; Sun, 17 Jul 2022 10:48:15 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 1A275240107 for ; Sun, 17 Jul 2022 16:48:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1658069290; bh=ko4E7gwpduACkT+87FYduPRYGNeh1rSZzVSJ2t6fZ3A=; h=From:To:Cc:Subject:Date:From; b=R9078K4hvCvaND82YskwFYL4i+B8WQ8EXeudgyUJQJgrCY7wk9x425fMbsvEc4tPY j97HVzo7EE5mq5ANL9upxG8S7u63cy0BKwg2Clk7+U0me0CAgP5YB/deEF1QhTeUks LY0x+a7SVMq2EhOfN1NcI5DGwwtOYcEYeO4/k9x/Z29M8sUtM4BX/+EeVIovAWEx/N Jbc3H3BOH6vuLvI8l5nNDO9Trd5i+6OnwN9NbfvcBgs4/zsv5pDysDwzQrA6OW5Epd hw/mTKEWJvpZu58J16/LP8lK/HFtuDur7dODedza1LAzDzejda/oG/r/jJCJvsYgC4 hnSUkU0zvJEgw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Lm7Hs04yrz6tmH; Sun, 17 Jul 2022 16:48:08 +0200 (CEST) From: =?utf-8?Q?Juan_Manuel_Mac=C3=ADas?= To: Ihor Radchenko Cc: orgmode , Maxim Nikulin Subject: Re: [PATCH] ox-latex.el: Unify in one single list Babel and Polyglossia languages alists References: <87sfxiw2jp.fsf@posteo.net> <87czeduxnz.fsf@localhost> <87lesvlvos.fsf@posteo.net> <87bkto83n7.fsf@localhost> Date: Sun, 17 Jul 2022 14:48:06 +0000 In-Reply-To: <87bkto83n7.fsf@localhost> (Ihor Radchenko's message of "Sun, 17 Jul 2022 17:55:24 +0800") Message-ID: <87zgh7ssm1.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain 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=1658071370; 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=FxSh9i/lF5IklfmDT6qAfJxIlmWhfwr8fORzYTV78Mk=; b=h9q/r0TamQjvUqmbYqLqx37WFYkm3MxTFKRXQRyNIcopiEQsomQwsR+V41OTnZTUH/XBF/ 6/kH8deNhbvHBVB+CCdYFiq8mOvgNe0rLKZiFQo0FJ5nKfEQTEyh3hoqgoX2pXllKOKyhQ xbhvi1Kg5oHWzJSkMpYHoH/QoRwxzr4pgaWgXP6eypgVmRxJKFwGg/WQlVVXTI5RLX+nL9 QvbBs5DuQr00xJdIWmZfKlmlPsJSJYLHsrtmW+84qTFm+0DDGcbYsIgKAHjOGK9Zce0kAY sYbLu2oEX/LsaUp7tUAI9sDlc/UlQ1CczlWvwNiKKPh0/aoFFILl86FLUlVaiA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1658071370; a=rsa-sha256; cv=none; b=XBgjm3HEQKvibAolrWxIMREAQnZ71OhkadqWyjvB1LysQxhxy8QC7u4KFAeVpSqhxaElWg smTCBYPSNF7nh9bocJdlxr7RW18cAE7OIyGm1f7t3l75D4JvNa5HHL94+BINuoaqREFrnh 0+UbKUv9GOxib2ooBHUoVSCJYIdBkeSdLTtN3wu2dVBbrKrMvA2UH3K0T306f6YQs2dVuI ywFc9tUF4D2dYlkMkgBDXjyjh9G7IpgpweIK8UCD2S0JTpqF7rY5FbpkbDWzV82Nsh/d4Y EBZi3h9p0euMrb0W8Z/9clmGp1ZtUrLxlfonIfMIgObn276LNmnHKa86Elmdsg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=R9078K4h; 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: -2.64 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=R9078K4h; 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: E77EC4092E X-Spam-Score: -2.64 X-Migadu-Scanner: scn1.migadu.com X-TUID: irTVMVWRkbHk Ihor Radchenko writes: > For Max's comment, using plist/alist would make things more clear > code-wise for future developers. I always find it annoying when I need > to go back and forth checking which element should be second or third or > forth in the list. Especially if the variable is used all around the > codebase. Though this particular case is not such - > `org-latex-language-alist' is used just in few places. I agree with Maxim and with you that an anonymous list is hardly usable for future features. For this new list I followed the style of the previous ones and I admit that I was quite conservative. The problem, imho, is that with the current org implementation I find it difficult to add new features. For example, Babel now has two ways of loading languages: the old one, through ldf files, which is the one that Org implements and that produces the traditional babel syntax; and the new system through ini files, which also incorporates a new syntax with many options and variants. New languages have been defined by ini files, but cannot be loaded by the old syntax. That is the cause of the asterisks in my list: when a language has an asterisk it means that it is only served in babel through an ini file and, therefore, the traditional syntax cannot be used, so it is not implemented for use in babel. And furthermore, the new babel syntax and ini files can only be used with the Unicode TeX engines: XeTeX and LuaTeX. This all looks like a puzzle (I'm getting dizzy just rereading it :-)), and I don't see a clean and sensible way to translate it to Org settings. I also think that the current Org settings for loading languages with Polyglossia or Babel is unhelpful and unclear. Also, it depends on putting explicit LaTeX code in the document. A code that, in the case of Polyglossia, is a fake LaTeX code, because something like this: \usepackage[french,AUTO]{polyglossia} is not really the Polyglossia syntax. And it can lead to confusion. I think this should be reimplemented in the future using a more org-centric syntax, using keywords (somehow keeping the above for backwards compatibility). I don't know, maybe something like this, with a specific keyword for language LaTeX settings: #+latex_language: es variant:mx babel-ini:t other:en,de,el etc. In this case, I think it would make more sense to define a more robust list, an alist or a plist (as Maxim suggested), leaving the door open to a fresh reimplementation of langs in latex export. I can get to work as soon as I have some time and finish with other commitments, that will keep me busy practically all summer. WDYT? Best regards, Juan Manuel