From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id aCGuGK4R3GLLhwAAbAwnHQ (envelope-from ) for ; Sat, 23 Jul 2022 17:20:14 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id aPifGK4R3GLcSgEA9RJhRA (envelope-from ) for ; Sat, 23 Jul 2022 17:20:14 +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 19EFE3D2A3 for ; Sat, 23 Jul 2022 17:20:13 +0200 (CEST) Received: from localhost ([::1]:53810 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oFGvM-0003IM-Dm for larch@yhetil.org; Sat, 23 Jul 2022 11:20:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50072) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFGum-0003Hq-Us for emacs-orgmode@gnu.org; Sat, 23 Jul 2022 11:19:36 -0400 Received: from ciao.gmane.io ([116.202.254.214]:47728) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFGul-00047b-I6 for emacs-orgmode@gnu.org; Sat, 23 Jul 2022 11:19:36 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1oFGuh-0002LQ-R8 for emacs-orgmode@gnu.org; Sat, 23 Jul 2022 17:19:31 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Max Nikulin Subject: Re: [PATCH] ox-latex.el: Unify in one single list Babel and Polyglossia languages alists Date: Sat, 23 Jul 2022 22:19:25 +0700 Message-ID: References: <87sfxiw2jp.fsf@posteo.net> <87czeduxnz.fsf@localhost> <87lesvlvos.fsf@posteo.net> <87bkto83n7.fsf@localhost> <87v8rtno2j.fsf@posteo.net> <87h73c527u.fsf@posteo.net> <87mtd3a2uw.fsf@posteo.net> <87wnc6wk3n.fsf@posteo.net> <87v8rp48i5.fsf@posteo.net> <87r12d44ws.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Content-Language: en-US In-Reply-To: <87r12d44ws.fsf@posteo.net> Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 28 X-Spam_score: 2.8 X-Spam_bar: ++ X-Spam_report: (2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FORGED_MUA_MOZILLA=2.309, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NICE_REPLY_A=-0.001, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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=1658589614; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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; bh=k5biDr2v1x5TQnHYi9C5Lf8gFBIHdjbq/NFriB10BiE=; b=G2yXIUrPkh7lGW5C+1hRTg1b8IQZLEp0SVediMBLbZeqWC82PURrRG0qihr7Ss3wp+UsfE KmkBF0yE2xUurxzGPen092R6YYqcbVMDc67ytGqFQY6KYNsxsByxdi0UF0OzoNJkCCvmSc helu0+v4HUcPnioSKmxLos6IJlqDO/YAy/H9aeqB9QO4JEaReQez+K+NBUlER65AcE0Nua rafSR3fzFqK6+Mp2gLcuNgE4N4wZ/xdzsKOv071vxIcNfU8AX+GKVHB5LPO4lLT/SNdDrZ OioJP1gb9VFFNAPxIwQbKZMtQVfMTSaMsUhCJ93jxvYusOxJe8j5Hb5DrRZ94Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1658589614; a=rsa-sha256; cv=none; b=XeBlrBzJPrFZfRg7jHx42knxJBaHo1D5gyWWHQlOk0D5bztUpnFEAYn2m5ZolrUra+r5Wb +ofgGrOHXMSBJ5Zz5NlU7qwb5HdRrhV7gc6Huuu9OOHJPQpqehDpMiU6hfJMQa2ajdJlt0 f1PT+ilCJOuBHVmT542GWujI8EvEm9s0Gikr3ImuXqAX+3kgN8AYocbfk21iQ5Ze5Klq8N 2GO9UqdIc8RUSibTYIxJ2OMzCyf3foFyBqOgDlCikhO5/jOVv+QqaIes9Jpo8a/yGYmbR+ xV0kc6Tua0y5icUm12yPt0UZSc5zIqeUpjqyhprQb93AAOw0Sj7W1eAFBr8n+A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); 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.47 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); 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: 19EFE3D2A3 X-Spam-Score: 2.47 X-Migadu-Scanner: scn0.migadu.com X-TUID: A/IaMjw8hQsR On 22/07/2022 21:07, Juan Manuel MacĂ­as wrote: > > Forget this. On second thought, I think that the option you proposed > "#+LaTeX_Header: % \usepackage{babel}" is much better. > > (I don't know where my head was and I didn't remember there was a > string-match, so your suggestion is the shortest way. However, the line > would have to be (with arguments): > > #+LaTeX_Header: % \usepackage[something]{babel} > > or > > #+LaTeX_Header: % \usepackage[something]{polyglossia} > > or modify the regexp in org-latex-guess-babel/polyglossia-language. It was you who suggested \documentclass[russian]{article} \usepackage{babel} At least at first glance it works in texlive-2019 (Ubuntu-20.04), so it is not a feature from the latest release. Unless commented out, "#+latex_header: \usepackage{babel}" may be considered as an instruction to add value of #+language: to \documentclass option. I do not expect that adjusted regexp will cause a problem. > Anyway, whatever the choice, I would vote for Org not to load babel or > polyglossia by default, and for the default option of the custom > variable that handles that globally to be nil. For example, I'm in the > group of users that load babel using an external preamble (a .tex or a > .sty file or a 'latex-class'), and frankly I don't want to have to add a > new line to all my documents to prevent Org from reloading babel for me > and return an error on the compilation. Doesn't the purpose of a custom variable is to set it to a suitable value in the init file making it unnecessary adding configuration to each org file? I did not expected that setting it to e.g. nil will be real burden for users like you. My vote is to configure babel by default if it is possible to provide default preamble that allows reasonable quality of PDF for simple Org documents with no explicit configuration. Ideally, the following should be possible out of the box. When no advanced features are involved, user should be able to just export document to e.g. having printed version of their notes during a meeting, to send a summary to the boss. etc. It should be possible for users completely ignorant in respect to LaTeX. Likely language is not enough and e.g. paper size should be guessed (LC_PAPER?) as well. If a document require careful tuning then a couple of extra lines in the org file or a couple of additional custom variables in the init file should not be a problem.