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 8OjYDNIG12KsbAEAbAwnHQ (envelope-from ) for ; Tue, 19 Jul 2022 21:32:34 +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 GEHlDNIG12LtgAAAauVa8A (envelope-from ) for ; Tue, 19 Jul 2022 21:32:34 +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 C07F4119E8 for ; Tue, 19 Jul 2022 21:32:33 +0200 (CEST) Received: from localhost ([::1]:33622 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oDsxM-00060H-VL for larch@yhetil.org; Tue, 19 Jul 2022 15:32:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34028) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oDswK-000605-91 for emacs-orgmode@gnu.org; Tue, 19 Jul 2022 15:31:28 -0400 Received: from mout02.posteo.de ([185.67.36.66]:46009) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oDswH-0007KN-PM for emacs-orgmode@gnu.org; Tue, 19 Jul 2022 15:31:28 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 0ED58240132 for ; Tue, 19 Jul 2022 21:31:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1658259080; bh=GuMxOuphfqGQCf/LcH6gnkGGEJLaxz3VgFobp6ZfceA=; h=From:To:Cc:Subject:Date:From; b=DNBvEzdFyh/O5NurMgESNzfudtXSFzPq7CsC7B+Fn+kNZQGtgE+rKpbor7D7qcRjw mI7+dnSCN59VeCkDK1SnDJlFJmpPCNJexu+irMJBmO5i/AihFbkb3pkreydAEso2sN q94rV5+ngtC0KWGm1BMx4J3vNAKFlT02NzAn1/a7aFxTy8Y9xXSPwIEJSokmEcIFMt UNbuag+ZhCKxde3hYfUj7P0NICBJfaqEGFrEipp5PKlIpXiBLeGfueFk0/0dgXSQBb 4DKt+mvP7pioxGjv9PeoB5BoxsR5bhhlAeAK2H2q2hTPDx3ociHFkEl1uwnFvBzR+L UkRZYbZzDGOag== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4LnTTf3vJ5z6tmV; Tue, 19 Jul 2022 21:31:18 +0200 (CEST) From: =?utf-8?Q?Juan_Manuel_Mac=C3=ADas?= To: Max Nikulin Cc: orgmode , Ihor Radchenko 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> <87v8rtno2j.fsf@posteo.net> Date: Tue, 19 Jul 2022 19:31:17 +0000 In-Reply-To: (Max Nikulin's message of "Wed, 20 Jul 2022 00:01:04 +0700") Message-ID: <87h73c527u.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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=1658259153; 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=Pz3qINlBw8MQ8uaQFVX86X5TVpV6Fgks3ZFP0TQjRyE=; b=VvKtuZrnG0sgjGk7OQhrsutvVRjmNSx0kg4sy989hl9+hVsh6TPyfyd9IbILfAIR7Msn3g k00ry3SyMELgYlhNuk01ikY/XDIjsNc20o09Obe5a5NksbMhWP1rROvY9L2cwrykJ4snSa v+RQ4ITVV+OxUf+W4GIa5vLNdcawGC/KLlcBtr5/4HUV4euOr/Nli3cgtFis8OC7y7qnCl EeK/oY69nlhBSRmUYwXErn/hxyAQ+5Kbz3LJd+lxU3wlBhrmcq+M0ZS0ApTLVY01Xogbrx mE3/D8cDDzZCZcc+kcuowWtrlZ6mjMYUbPle/Q6xY6q4GVx2NxmFcd2z40mqBQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1658259153; a=rsa-sha256; cv=none; b=YbbueApgCaOjiIfVOovWIeNtz/ZHC46ikUs6fGCth8QQjqG1ddffyEnq/C1Yirr3uTeY7X U1/oGO3hWVqM0Y7T4eifqagTabf++uD29Ij9V6PrsrZwIh2HHdV+3KRkQw1HoOlxRqgXSM IkfXhvHNS99Ez4RFzv94Lej+4MI7esS9aN+kd3PU5IepLtgsa1H+h9uu7+7+n4wzwI+FrH tsvfu5imF8umcnq0E63KMRo9OaaagTSjmWmSBH8ZAU+JmqKRtj3YBBliEmJcvyDL2YKtYj aJc5aQ7YsB3pNQeuleB+dmkOCO90+Z8KqWP6M4p/PKkIQV5jZCfD0sTGSnqbGQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=DNBvEzdF; 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=DNBvEzdF; 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: C07F4119E8 X-Spam-Score: -4.13 X-Migadu-Scanner: scn1.migadu.com X-TUID: k+nwmv03jM53 Max Nikulin writes: > On 19/07/2022 22:01, Juan Manuel Mac=C3=ADas wrote: >> + (replace-match >> + (mapconcat (lambda (option) (if (equal "AUTO" option) language >> option)) >> + (cond ((member language options) (delete "AUTO" options)) >> + ((member "AUTO" options) options) >> + (t (append options (list language)))) >> + ", ") > > In my opinion this code should not attempt to be excessively clever. > If user skipped AUTO then do not append language. Test for duplicated > options is redundant as well. Such cases may still be a reason to > issue a warning (e.g. by `org-lint'). I completely agree. I've kept that old part of the code for backwards compatibility and because, at the end of the day, it doesn't break anything new. I mean, if a user declares the main language using babelprovide and this code (too intrusive) puts the main language in the Babel argument too (something the user doesn't want in origin), that syntax is supported by Babel. Babel simply takes into account the main language declared with babelprovide, if the 'main' option has been added. But even if it doesn't return any errors, it's unnecessary redundancy. Anyway, yes, it's too intrusive. I am in favor of removing that part, but I don't know if it will have any effect on backwards compatibility. (BTW, I think I didn't explain in this thread the advantages of using babelprovide over the traditional ldf file system. With ini files the user has more control over the loaded language and there are many options, including the ability to associate a font with a script. Furthermore the user can create his own custom ini files, and define his own languages. For example, I could write an ini file with specific values for Spanish, or even an imaginary language. On the one hand, it is an important advance. But on the other hand it adds more fuel to the current great latex pandemic: multiplicity). > On the other hand I would consider adding babel by default without > explicit header. To suppress loading users may add > #+latex_header: % \usepackage{babel} I don't understand this very well. What would happen, then, to users who prefer to use Polyglossia, or those who prefer to explicitly add babel or polyglossia code? > I like that you decided to avoid inventing of a DSL just to have > org-like options that are translated to to a couple of preamble > commands. From my point of view it would not help novices and would > make things more complicated for experienced LaTeX users. Yes, in the end I realized that this was getting into a slippery slope, especially for the reasons you mention... >> #+latex_class: article >> #+latex_class_options: [11pt,draft,AUTO] >> #+LaTeX_Header: \usepackage{babel} >> #+language: ru > > While AUTO is suitable for \usepackage{babel} and \babelprovide, for > class option the placeholder should be clearly associated with babel, > e.g. BABEL_LANG instead of AUTO. What you say makes sense. However, this was ultimately not implemented in the current version of the patch because the argument of org-latex-guess-babel-language is a #+latex_header keyword. > I am not familiar enough with setting used to generate preview of > equations or images from LaTeX source blocks, so I am not completely > sure that suggested changes do not affect these features in some > negative way. I think that shouldn't affect previsualization, because if I remember correctly the preamble used for previews is the value of org-format-latex-header. But I'm not sure... Best regards, Juan Manuel=20