From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id SCp0ANP0rmA+TAAAgWs5BA (envelope-from ) for ; Thu, 27 May 2021 03:24:35 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id IB3HN9L0rmC+cAAA1q6Kng (envelope-from ) for ; Thu, 27 May 2021 01:24:34 +0000 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 73623181AD for ; Thu, 27 May 2021 03:24:34 +0200 (CEST) Received: from localhost ([::1]:39994 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lm4lD-0008NX-Bu for larch@yhetil.org; Wed, 26 May 2021 21:24:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38296) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1llqWj-0007WC-9s for emacs-orgmode@gnu.org; Wed, 26 May 2021 06:12:38 -0400 Received: from smtp-4.b-tu.de ([141.43.208.14]:59244) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1llqWf-0007sh-1j for emacs-orgmode@gnu.org; Wed, 26 May 2021 06:12:36 -0400 Received: from localhost (localhost [127.0.0.1]) by smtp-4.b-tu.de (Postfix) with ESMTP id 4FqmnX167hzGsZnT for ; Wed, 26 May 2021 12:06:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=b-tu.de; h= content-transfer-encoding:mime-version:x-mailer:message-id:date :date:subject:subject:from:from:received:received; s=smtp; t= 1622023598; x=1622887599; bh=LKPwKCoLrImzslQ2lk2EmVGQmUC9ELJKRMJ IGwwQHAQ=; b=xRVuaV1QLAsb6v0NJIX/wHYsaenDdlKrfjvlLc9dFALzDQiWwEU Xki6LcPExIlS6HcI4zWk/CwlEhoX06qAIKZtP5UTY7luPFLPSv8T96r0bk09IqSe A2wxZTrpZjwmm5BOIPRaJh7TO/x0n04Hw9MeDJlPs8MjPeHs36EUQheU= X-Virus-Scanned: by AMaViS (at smtp-4.b-tu.de) Received: from smtp-4.b-tu.de ([127.0.0.1]) by localhost (smtp-4.b-tu.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 0JSxf4b81nt0; Wed, 26 May 2021 12:06:38 +0200 (CEST) Received: from TrainHorse.fritz.box (p5498799f.dip0.t-ipconnect.de [84.152.121.159]) (Authenticated sender: hubermar) by smtp-4.b-tu.de (Postfix) with ESMTPSA id 4FqmnV0zMFzGsZXq; Wed, 26 May 2021 12:06:37 +0200 (CEST) From: Markus Huber To: emacs-orgmode@gnu.org Subject: [PATCH] ox-latex.el/org-latex--make-option-string: Surround option string with braces if it includes brackets Date: Wed, 26 May 2021 12:06:18 +0200 Message-Id: <20210526100618.78971-1-markus.huber@b-tu.de> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=141.43.208.14; envelope-from=markus.huber@b-tu.de; helo=smtp-4.b-tu.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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Wed, 26 May 2021 21:23:56 -0400 X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Markus Huber Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1622078674; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=aZ2idhZ6gYzRrNjfzu/rqL2Cl5mLo1QsE0r63SmWBTw=; b=qUYNed9oytkrRLdDg3nyQ8HwZqsC07h+DBrGIWmVwPgJeuKPzu8olOSVK2p7Wjt4j3dFuB 4wqHS8Dn2z5f5EWdwHEyb1lVfIsZCqx01tnZZuOgeYHh0ZQ7SOF+2G+WUhiUOTWksyfU23 K4ld3pgIL35SnIjnSD3tpAY7YOsWcXxJd+nh3/FfUv6drzPDA9Vqk1sWaDDI9fllSshhX2 TJEN/Mbg428K3ppZm150dQrgnWOZMJZCXPXVPQmai3eJj9D54beh9+P52fF50d5wNhpg9m KglwPWgFkT5whBKBYlH0UzqZRO/PpffC1v0IWs9zA4JcwVj+dcjykmJzWR9Tkw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1622078674; a=rsa-sha256; cv=none; b=tM3wZ9h4G93tNHiIZSKcaKbwbJKegn9Dhg1ucgVwpF89mnfV0p8/GU0yiuXHdGdMLI+xlA SQnHg/OQHCYJHFBTV6DQ0AhVDkwZgu6yHM6MzyCNV4YhPekkKxSn80YbkkPZe+sEgchdQq g/W2uCHhTf1pyKyZc1BmpD8DcoLA9AnkvsCTtc3LiZEmLUBwtOPDShsxiBj5PqABRcJq6B aaHprdYI+vZNBYc7hraSBjXXBU3Dg+M0AqlUfliwGAUYcD1p3pxyKMbTQrl3D7DoGwJ0ro /+fxwKSG2jHI8pC8uTm/OuEuHkoytZHR5PYOAof+xbvhoQGJ4PHLxZVv9HmGZw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=b-tu.de header.s=smtp header.b=xRVuaV1Q; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: 0.87 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=b-tu.de header.s=smtp header.b=xRVuaV1Q; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 73623181AD X-Spam-Score: 0.87 X-Migadu-Scanner: scn0.migadu.com X-TUID: DM4nkLg/OtRJ lisp/ox-latex.el (`org-latex--make-option-string'): If `value' of a `pair= ' from `options' contains a bracket the whole `value' is surrounded by braces. In case of LaTeX export using listings the dialect of a language (e.g. [L= aTeX]TeX) is surrounded by brackets. For inline source blocks all options end as optional argument to \lstinline between = brackets which breaks the LaTeX parser. TINYCHANGE --- lisp/ox-latex.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index b9ecf070a..2f7bbdf15 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -1486,7 +1486,7 @@ nil." (pcase-let ((`(,keyword ,value) pair)) (concat keyword (and (> (length value) 0) - (concat "=3D" value))))) + (concat "=3D" (if (string-match-p "\\[\\|\\]" value) (format "{= %s}" value) value)))))) options ",")) =20 --=20 2.31.1