From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id QI+OAdcnS2OUWAAAbAwnHQ (envelope-from ) for ; Sat, 15 Oct 2022 23:36:23 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id qFmiAdcnS2O1BwAAauVa8A (envelope-from ) for ; Sat, 15 Oct 2022 23:36:23 +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 76F2A1723A for ; Sat, 15 Oct 2022 23:36:22 +0200 (CEST) Received: from localhost ([::1]:45012 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ojopR-0001pr-8H for larch@yhetil.org; Sat, 15 Oct 2022 17:36:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38570) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ojooo-0001pf-C9 for emacs-orgmode@gnu.org; Sat, 15 Oct 2022 17:35:42 -0400 Received: from mout01.posteo.de ([185.67.36.65]:55879) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ojooi-0004JY-R5 for emacs-orgmode@gnu.org; Sat, 15 Oct 2022 17:35:42 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 387A3240026 for ; Sat, 15 Oct 2022 23:35:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1665869732; bh=Zrh3QSKPomP4WlintuR1wSU579q4/CzXcv1Nm5TSf4g=; h=From:To:Subject:Date:From; b=HLyI6rfgtHobR4vWwtalshs5Mqf6BHU+gVUJz6wqVI2cBM+U7Wj5ga/AvMAzFYOA5 DcbOu6JKFfIhFh0APPA+DY/eGNwF5nCdXoM1zdM6QKwC/oOMpwFmJcHRZY6zj5svBb vvf1RMVI6u+g+ecl/YW07PliTfqEJaVrmBFGIomqG0VaAaoMqsLAuImNLFyiq3LM4l Roq/54edXtDLTPi1ClNKCK/321RE1PoCdQkFbYBncfPjpwI3+vbWjJ0F40dEGYuRaA VKeCEx2JYNLMbN3qqG+IU4WvsdB9xOnz53MGkurOGpOZDnXXnF6rcScw6wbH67tiMs Ybe2kn72qolAQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Mqc4L5FsXz9rxF for ; Sat, 15 Oct 2022 23:35:29 +0200 (CEST) From: =?utf-8?Q?Juan_Manuel_Mac=C3=ADas?= To: orgmode Subject: [bug] `org-latex-line-break-safe' breaks the export of verse blocks to LaTeX Date: Sat, 15 Oct 2022 21:35:24 +0000 Message-ID: <875ygk6a8z.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.65; envelope-from=maciaschain@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, SPF_PASS=-0.001, T_SPF_HELO_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" 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=1665869782; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=noNlrEKGgZ/PGIQq5VN4l8XRZJzOR+wUC4WW2jjeJrU=; b=JjiWBgFuSdJsVZKZoy5TxTHncR05B/+EuX3F+98RPhSU7fzy/Ojgoqmnrww+RljpYtvZnZ U6P9dPe8s9knuXmOq3AJzOhoE1b1UHjj91OKmqN0hv+WN3/uYHwZgX2DQtyVOiwpWoiRg4 GNsVDzeaX28Tq0oyOpJ2v/4ooZTv0AQ1V43ecEALyzsL0wUnYBX6TVwpSR6pFLWHKe8ejH h4cQyFTofbmZIjXZc07yl5KUb6xPcpgSvWm43/eM38kFlZT/V35D8MNHu6bq7MSsPgFiJ6 gy1Tu4tUTtYDBaFBzN5SXmh8zYY/10dFaWd1g0fFTHNapFLIdoAeOg48GV4ScA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1665869782; a=rsa-sha256; cv=none; b=p0GhgMDmdBhvXxawpAngNSdI6Q/oVDAa02hmFN+Q1r4R7NBWqs0c9pyZaEi/VOupliixkP 0oZHJreaeRUh3zw+bt++5FBc9//nETXbosCtTYY6MoDdA14xQhzMICmUFJKx9t8Ri4iyJn pbsm+fQjkEKM5wC2Dioji5lZSRp5ieyJrgMdsDUJ/JrUtWemzpPQgEPAQrBsL8FJCbyd9R t92lUH7zjGyZ4Ymh1Ht7Lq0ug4q6sWvo29ClMQkHLzIsaPaX7FS6qkVbhLMB+pMKj3MiHi YXmFJZlDO/32DNj4ClS+4nogFM5X9SveOCprIuXKvbe6S5vooLssaAVBSio7fQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=HLyI6rfg; 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.00 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=HLyI6rfg; 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: 76F2A1723A X-Spam-Score: -4.00 X-Migadu-Scanner: scn1.migadu.com X-TUID: CH7VB/SIOObZ The recent addition of the `org-latex-line-break-safe' constant makes it impossible to compile verse blocks. The reason is that now a \\ is inserted between each stanza (aka each paragraph), instead of the `\vspace{1em}' as before. That's wrong, as this compile error message says: --------- A \newline or \\ command appears between paragraphs, where it makes no sense. If you're trying to ``leave a blank line'', use a \vspace command. --------- You can test yourself with this example: #+begin_verse lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor #+end_verse On the other hand, I have a few reservations about the usefulness of org-latex-line-break-safe. To begin with, it is a particular solution applied in a general way. This can have unexpected consequences, as has happened in verse blocks. It's like putting your whole body in a cast because of a broken finger. I think if the reason for this addition is to prevent problems with square brackets, in certain contexts, why not just apply a point solution? For example, putting {[}, which is a common LaTeX way to protect a square bracket. Use a macro, for example, or even define a new entity, something like: (setq org-entities-user '(("lbrack" "{[}" nil "[" "[" "[" "[") ("rbrack" "{]}" nil "]" "]" "]" "]"))) And finally, I think that applying a general solution to this problem is something that should be done(IMHO) in LaTeX and not in Org, for example, with some new package that would protect certain signs or through ad hoc LaTeX/Lua code. Best regards, Juan Manuel=20 --=20 -- ------------------------------------------------------ Juan Manuel Mac=C3=ADas=20 https://juanmanuelmacias.com https://lunotipia.juanmanuelmacias.com https://gnutas.juanmanuelmacias.com