From mboxrd@z Thu Jan 1 00:00:00 1970 From: emanuel.charpentier@gmail.com Subject: Re: Possible bug in org-mode (MELPA version as of 1018-11-25) : #+language: is not (fully) honored. Date: Sun, 02 Dec 2018 21:26:43 +0100 Message-ID: <0b203d5f5c53407d7d19dbb4a1351fd22909615b.camel@gmail.com> References: <7ecc5c8e82316b99d6a55b77a29f1a8d1e77ca5b.camel@gmail.com> <87sgzmk3fn.fsf@gmail.com> <87pnuqtggf.fsf@nicolasgoaziou.fr> <070afa36c50daaec4016356bbb36d2167f358616.camel@gmail.com> <87pnuqrsw4.fsf@nicolasgoaziou.fr> <875zwhs3dr.fsf@nicolasgoaziou.fr> <87tvk0q8op.fsf@nicolasgoaziou.fr> <87h8fzr93h.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-qLvbcS/+cOddJWjKSDuW" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60894) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gTYKK-0004di-VV for emacs-orgmode@gnu.org; Sun, 02 Dec 2018 15:26:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gTYKG-0000jo-2A for emacs-orgmode@gnu.org; Sun, 02 Dec 2018 15:26:52 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]:34775) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gTYKF-0000jN-QE for emacs-orgmode@gnu.org; Sun, 02 Dec 2018 15:26:48 -0500 Received: by mail-wm1-x32a.google.com with SMTP id y185so5505339wmd.1 for ; Sun, 02 Dec 2018 12:26:47 -0800 (PST) In-Reply-To: <87h8fzr93h.fsf@nicolasgoaziou.fr> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Nicolas Goaziou Cc: emacs-orgmode@gnu.org --=-qLvbcS/+cOddJWjKSDuW Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Dear all, Please find enclosed a proposed patch (against master) to document the need for babel/polyglossia in order to honor #+language in LaTeX export. This is purely a documentation patch. A better solution would be to detect the use of a non-default #+language: and act accordingly. Nicolas notes (rightly) that babel (and polyglossia, BTW) are too "invasive" to be default, and is shy of auto-loading the necessary package(s) "automagically. I do not (yet) know how ti reconcile these imperative, hence the present interim atch (which should disappear if/when a better solution is created). HTH, -- Emmanuel Charpentier Le jeudi 29 novembre 2018 à 20:12 +0100, Nicolas Goaziou a écrit : > Emmanuel Charpentier writes: > > > This is *not* *documented* (not even in the `org-latex-packages- > > alist''s > > docstring). > > I know. I fixed `org-latex-packages-alist''s docstring two days ago. > > > Also agreed, with the reservation that "invasive" didn't mean the > > same > > thing in the 1980s (when the core size of computers was measured in > > kilobytes) and in the 2010s (the current core measurement unit is > > the > > /giga/byte...). > > Not invasive by its sheer size, but by the number of alterations it > generates in the LaTeX default behaviour, and the incompatibilities > it > may introduce. For example there used to be issues between frenchb > and > KOMA-Script. > > > Again, I think that the end user should *not* have to worry with > > this only > > when exporting to LaTeX (or beamer or PDF). > > Ideally, that would be nice. > > > If this can be handled silently when exporting to ODT, HTML or > > plain > > text, it should be handled silently when exporting to LaTeX. > > I disagree. Packages should not be loaded /silently/. > > > I do not know how to handle this. My *hunch* is that the Latex > > Export > > function generating the preamble should check for language > > It does already, in `org-latex-guess-babel-language'. > > > and if not default, add the relevant package(s) to the preamble. > > Don't. Anything that is in the header should be declared. > > We could try and see if Babel causes trouble by adding it to default > packages in "next" branch. I'd rather do that than inserting it > magically. --=-qLvbcS/+cOddJWjKSDuW Content-Disposition: attachment; filename*0=0001-org-manual.org-document-the-need-for-babel-when-sett.pat; filename*1=ch Content-Transfer-Encoding: base64 Content-Type: text/x-patch; name="0001-org-manual.org-document-the-need-for-babel-when-sett.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