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 WMnVK3AB1WIEEgEAbAwnHQ (envelope-from ) for ; Mon, 18 Jul 2022 08:45:04 +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 ONaxK3AB1WKBBQEAauVa8A (envelope-from ) for ; Mon, 18 Jul 2022 08:45:04 +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 2FA5012DBA for ; Mon, 18 Jul 2022 08:45:04 +0200 (CEST) Received: from localhost ([::1]:39614 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oDKV4-0001pe-Hd for larch@yhetil.org; Mon, 18 Jul 2022 02:45:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40226) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oDKTw-0001pF-Gf for emacs-orgmode@gnu.org; Mon, 18 Jul 2022 02:43:53 -0400 Received: from mail-oa1-x2f.google.com ([2001:4860:4864:20::2f]:40668) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oDKTu-00017n-Jj for emacs-orgmode@gnu.org; Mon, 18 Jul 2022 02:43:52 -0400 Received: by mail-oa1-x2f.google.com with SMTP id 586e51a60fabf-10c0e6dd55eso21503737fac.7 for ; Sun, 17 Jul 2022 23:43:50 -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=sJTissfM1Dfghg+gTzQHofaTtrHsaBzCHt7sFjyaD5I=; b=HlzOHFGchK994Mc5V0qXtpo64MqyuTTItbQacirtR05anOkmQCl9C8AD2TKEYddedq 6rbL0JZxDkjbPfR9JLilRKRhh/bp8emotx3kdgtQZqnF8GZc+xF5C/U5mhdGuRnkUpcs gII7i5hT4cDzEBqF9KOQO9QiTh/191O9IswQZzSfcnGTV36m4sM64xypfLshupa5PuW9 JnZm+0et9jtiMmYP0aY0eAQzBVKtTHX8rXbqz9vFELscsNz4JslmpUDZMNcwUxb0QJ7n /W59JU4EcBUPfQAyUdS4SvfvG3DWGt4y+n6ut7Pmz9aEyQEIFJERNkXNLU6nFsJDGPCB zShg== 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=sJTissfM1Dfghg+gTzQHofaTtrHsaBzCHt7sFjyaD5I=; b=QOYMsk2bJ1zGihpx6RX+GkB0GGQd3XcIGFDrkKL1zxlle2CwjRP8EVnTnaEyQfaBLT ZNfAmT3chigrmyuOBU8NmwqPEsdjyrqx9SsAmEka6HDef5OGmz8tpeEVu6es8IYIa0Ge FdL4FBG0u4QH0/GSWjc2oqxDZm3QIGCcl19xfXIbFqe+wj4Z597P0+cLcQA32Fb9KHHF yMOvmhQk2h4RGu8YM7TeR9+6wLw3id182GqBAHnTtTvy9g7SYGGa5d4YtSSV8JsoMsKs klVW0bDe4drY7fdfolV6WEblbWcB0PsoOMALvCzGYQt7WJWIc8Qy5TaK1ZSHBiFAr0uZ JsVA== X-Gm-Message-State: AJIora8KhV+OQ3g7rpsRmAZH8525nx53QVXvInZ9+6PZwUyzujKgSqw4 MEHntNok2cvAek2HGTAJhDI= X-Google-Smtp-Source: AGRyM1vug7E0ATE/rQzIl/1DfEajyCOMpFt0M3Yfq4cmcBcm030aCAAQ4ZpWc/ro7b0R+xaJZCWYQA== X-Received: by 2002:a05:6870:2181:b0:10b:f645:e49f with SMTP id l1-20020a056870218100b0010bf645e49fmr14089434oae.267.1658126629178; Sun, 17 Jul 2022 23:43:49 -0700 (PDT) Received: from localhost ([115.154.175.57]) by smtp.gmail.com with ESMTPSA id cb1-20020a056830618100b00616c46f6daasm4783496otb.31.2022.07.17.23.43.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Jul 2022 23:43:48 -0700 (PDT) From: Ihor Radchenko To: Juan Manuel =?utf-8?Q?Mac=C3=ADas?= Cc: orgmode , Maxim Nikulin Subject: Re: [PATCH] ox-latex.el: Unify in one single list Babel and Polyglossia languages alists In-Reply-To: <87zgh7ssm1.fsf@posteo.net> References: <87sfxiw2jp.fsf@posteo.net> <87czeduxnz.fsf@localhost> <87lesvlvos.fsf@posteo.net> <87bkto83n7.fsf@localhost> <87zgh7ssm1.fsf@posteo.net> Date: Mon, 18 Jul 2022 14:44:52 +0800 Message-ID: <87y1wqhqcb.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2001:4860:4864:20::2f; envelope-from=yantar92@gmail.com; helo=mail-oa1-x2f.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=1658126704; 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=sJTissfM1Dfghg+gTzQHofaTtrHsaBzCHt7sFjyaD5I=; b=d/Cfx/CD3LjWLkkzElCWESKHCp2awfL8AWl9zh+wgbPoyRuVbGnnvg/cZvFFdUnlusRodL le3YdX05ZrvRTC8r1ZiP49WHs+Vc+CpHK/wFxybeVYX3YWmRvRXI9cPDYVZfyvGSjAPuXg F5HJV4qVv9OxoiWH/D8yP9hix8f7sRT8o5w+i4MHdTp31q2yR28RZS+/Jlhq7f6p2HHf7N VHBIXbXRisSYeItzZ2Ta/tR6jU+AW19avxKVMH7kwWONYJWjQvuH6Z7xxSDx4Sl2ByHT9S +hZMeyvOJypb5aWqaAkf7Xu5PlpB6kW1IedDqaC7xyyNdpnNCoWGMnOWFzbO1A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1658126704; a=rsa-sha256; cv=none; b=NOBzJ78qGus5eQuyUQTcmjKyMDI3uZXhHn1mxNTX7ywJntTfEeoekcEtkyCHJ56wU9HJO8 EL6eTlFscvILbTPWa+MQcSPF6sT9/zucuHIThjjjDLUpIXugm7xfRAKp4hi3+DVWk7L0ES ZpZ9zqSS7FiXYSCJ3qlLV6ZVba1ZFV51DZ2pIgBQdBn5zio+Em90aokZoSrASlIQP3pZAi hIf5WuIOo7YMYKjWny069Q7+l4yHD2lGJYSkNjb4kA0AQFwXeBt7+faMlmFBihJH+ruRau Pl2xoHmx8r8OmyKkFXlwjNLjhxfgq5JDeJNsEZOIBI0hX0Y8omPkXdMAAwSZZQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=HlzOHFGc; 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: -5.43 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=HlzOHFGc; 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: 2FA5012DBA X-Spam-Score: -5.43 X-Migadu-Scanner: scn0.migadu.com X-TUID: 0xrFAMrFNwy4 Juan Manuel Mac=C3=ADas 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. Do you refer to the paragraph below when saying that Org implementation makes it hard to add new features? The rest of the above paragraph implies that the difficulty is on LaTeX side, not on Org side. In any case, your existing patch is an already an improvement. I do not deem it as requirement to apply the patch. > 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 hope that Timothy's work on more flexible and configurable template generation can improve things. > 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? This sounds reasonable. Implementing via :options-alist export property will conform more to the overall design (see the docstring of org-export-options-alist - it enables a lot of flexibility in terms of customization, including the option syntax similar to what you proposed). Best, Ihor