From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 SGT9LR7McmNLHQAAbAwnHQ (envelope-from ) for ; Tue, 15 Nov 2022 00:15:42 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id aJoBLh7McmMPbgAA9RJhRA (envelope-from ) for ; Tue, 15 Nov 2022 00:15:42 +0100 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 3B03A3ACB7 for ; Tue, 15 Nov 2022 00:15:39 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ouif9-0005DW-IV; Mon, 14 Nov 2022 18:14:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ouidv-0001df-GZ for emacs-orgmode@gnu.org; Mon, 14 Nov 2022 18:13:31 -0500 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ouiDX-00023L-4q for emacs-orgmode@gnu.org; Mon, 14 Nov 2022 17:46:26 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id D4CFC240101 for ; Mon, 14 Nov 2022 23:46:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1668465971; bh=+9w+UIWhhDfI6kVwkOlWeHvRNPvUCahXzfo8/99vxb8=; h=From:To:Subject:Date:From; b=ZCzBDNB+eppKVtmBJ7bgbMYyy/llFvg+nd8Y2X6eQMYXRqnc9XYEEWrJul7w1Vf1+ U/w8SfsKnD3Ezzwz9+1dxAVZPb+37MOYdCi+v/QWN7K6mdNoiJBG4iuvQn7niN32cQ k4ILkbyppj0BLiSsGPS969n7pORzduhP7DIymsB0FhtBOU3jHg5916Yjq+WT5Bpe1L YUM+Cj/StAw9PTHYYOTwc5ixlFBrdasiI9/AHUVIUi5ihFIpYywnKOv35jcaVeS2cS GPlYjqvRzqbzBC5rijYbzRSxzATIJwTvjhFV0au4/8Ms8J4+qF26ynvLEaWaLQRGVy cQrQLqXCDEAIA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NB4D30sZnz9rxM for ; Mon, 14 Nov 2022 23:46:10 +0100 (CET) From: =?utf-8?Q?Juan_Manuel_Mac=C3=ADas?= To: orgmode Subject: [PATCH] ox-latex: fix `org-latex-guess-babel-language' Date: Mon, 14 Nov 2022 22:46:08 +0000 Message-ID: <87o7t9889b.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=185.67.36.66; envelope-from=maciaschain@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_NONE=0.001, T_SPF_TEMPERROR=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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1668467742; 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:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=8BwYQ3Mke4OAF7gN9u184w9rcZ3yCmTQPD4bHaLkDmM=; b=uqmcPwH5ptlH61W8wg9737Uq2nXwNm9Af9vxpNdk9X7n93dmArNblP0l97sYpXXsj6Z2t2 SJZrHSgJY27wmEzlS8iO1NRCxkQb0dKwd544nKQMUeaX5nelSrCbzkf4lnCa5JHcLxHvxe SkNDqLaAhu6nrxGuryY+oZs07Z+qg8qyl/s4WNOL/10GEVbexSjVoLS3c2q934Sqeu4cRj dknZZ+wWeal6zfexjjmN1MlJcmZYjC5wVuOz1tPVs/kgTxr5HOW1PBdyu0eFCrapECncsM d31WhAnqOc1qIzAR0yoRU2mZd0cgfrTYGSKFAWz/qcKSUryFJUnZHpabSGoxpw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1668467742; a=rsa-sha256; cv=none; b=uXzchU4L2ZlDD4cd8al9lz2gtlb1Bym4NPUzLyJB9Lt8/HfYQZfqIX1/S/+sUBEX3hBzUK v7h0Mt8Gb6pjPARTbJ8FDWMgRQv3GWA0HRgFbZiSrEQWHD57cE9PWZThYACFUaXDqZoKuS 0qBghwcnF3wX4qgG9rnyZ4YmKWEP125IG/HX77Md1qgB+dhTRXB348esL1ULhFB6GHWb4z ukp0Jc7K0zWALu4YSbSRaHthK8mB5g/V6u+27TNc8M26KGQ70dZ4j+c2b0diy7k7pD4oBV Sh/k2KxBW3Ar88BfeGS36knAaLykzgYjH5ddmpLXsOJS4GW7gY3+OPmQizd/CQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=ZCzBDNB+; 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: -9.14 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=ZCzBDNB+; 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: 3B03A3ACB7 X-Spam-Score: -9.14 X-Migadu-Scanner: scn0.migadu.com X-TUID: i7Z1eITFAd10 --=-=-= Content-Type: text/plain If the user puts a string other than AUTO as an argument to `\babelprovide', it gives an error when exporting. For example: `#+LaTeX_Header: \babelprovide[]{hebrew}' I am attaching a patch to fix that behaviour. Best regards, Juan Manuel --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-lisp-ox-latex.el-fix-org-latex-guess-babel-language.patch >From 6dcba41f58b355296c3cacf97be9508581e1a10a Mon Sep 17 00:00:00 2001 From: Juan Manuel Macias Date: Mon, 14 Nov 2022 23:33:16 +0100 Subject: [PATCH] lisp/ox-latex.el: fix `org-latex-guess-babel-language' * (org-latex-guess-babel-language): If the user puts a string other than AUTO as an argument to `\babelprovide', it gives an error when exporting. For example: `#+LaTeX_Header: \babelprovide[onchar=ids,import]{hebrew}' --- lisp/ox-latex.el | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index 9bdb9fb63..095f6b51c 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -1669,12 +1669,13 @@ Return the new header." (if (not (string-match "\\\\babelprovide\\[.*\\]{\\(.+\\)}" header)) header (let ((prov (match-string 1 header))) - (when (equal "AUTO" prov) - (replace-regexp-in-string (format - "\\(\\\\babelprovide\\[.*\\]\\)\\({\\)%s}" prov) - (format "\\1\\2%s}" - (or language language-ini-only)) - header t)))))) + (if (equal "AUTO" prov) + (replace-regexp-in-string (format + "\\(\\\\babelprovide\\[.*\\]\\)\\({\\)%s}" prov) + (format "\\1\\2%s}" + (or language language-ini-only)) + header t) + header))))) (defun org-latex-guess-polyglossia-language (header info) "Set the Polyglossia language according to the LANGUAGE keyword. -- 2.38.1 --=-=-=--