From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 30056 invoked from network); 9 Sep 2021 12:22:02 -0000 Received: from bsd.lv (HELO mandoc.bsd.lv) (66.111.2.12) by inbox.vuxu.org with ESMTPUTF8; 9 Sep 2021 12:22:02 -0000 Received: from fantadrom.bsd.lv (localhost [127.0.0.1]) by mandoc.bsd.lv (OpenSMTPD) with ESMTP id e159dddd for ; Thu, 9 Sep 2021 07:21:56 -0500 (EST) Received: from scc-mailout-kit-02.scc.kit.edu (scc-mailout-kit-02.scc.kit.edu [129.13.231.82]) by mandoc.bsd.lv (OpenSMTPD) with ESMTP id 08603abd for ; Thu, 9 Sep 2021 07:21:55 -0500 (EST) Received: from hekate.asta.kit.edu ([141.3.145.153] helo=hekate.usta.de) by scc-mailout-kit-02.scc.kit.edu with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (envelope-from ) id 1mOJ3y-0004fY-Oy; Thu, 09 Sep 2021 14:21:55 +0200 Received: from donnerwolke.asta.kit.edu ([141.3.145.61] helo=donnerwolke.usta.de) by hekate.usta.de with esmtp (Exim 4.92.2) (envelope-from ) id 1mOJ3x-0005xC-8l; Thu, 09 Sep 2021 14:21:53 +0200 Received: from athene.asta.kit.edu ([141.3.145.60] helo=athene.usta.de) by donnerwolke.usta.de with esmtp (Exim 4.84_2) (envelope-from ) id 1mOJ3x-0004oP-59; Thu, 09 Sep 2021 14:21:53 +0200 Received: from localhost (athene.usta.de [local]) by athene.usta.de (OpenSMTPD) with ESMTPA id f6952cfb; Thu, 9 Sep 2021 14:21:53 +0200 (CEST) Date: Thu, 9 Sep 2021 14:21:53 +0200 From: Ingo Schwarze To: nabijaczleweli@nabijaczleweli.xyz Cc: tech@mandoc.bsd.lv Subject: Re: eqn delimiters break conditionals Message-ID: <20210909122153.GC55767@athene.usta.de> References: <20210908132448.xknl7noihywihkdh@tarta.nabijaczleweli.xyz> X-Mailinglist: mandoc-tech Reply-To: tech@mandoc.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210908132448.xknl7noihywihkdh@tarta.nabijaczleweli.xyz> User-Agent: Mutt/1.12.2 (2019-09-21) Hi, Nab wrote on Wed, Sep 08, 2021 at 03:24:48PM +0200: > Consider the following file: > -- >8 -- > .EQ > delim %% > .EN > .if 0 A % B % C > .if 1 D % E % F > -- >8 -- [...] > However, mandoc (1.14.4-1 and latest CVS as of an hour ago) does not: > -- >8 -- > $ ./mandoc < a.1 | grep -v '^$' > () () > B C D E F > () > -- >8 -- [..] > This smells like a bug to me, for reasons I assume obvious. Yes, that is a bug, and it was so far unknown, too. The reason for the bug is that roff.c implements eqn(7) delim by replacing delimited equations with .EQ/.EN blocks on the fly, and then they are no longer on the conditional line. Fixing it requires to either implement delim in a completely different way, which would cause very major code changes. Or the delim handling could possibly be moved after the handling of conditionals in roff_parseln(). But the code in that function is very prone to regressions. Consequently, i won't attempt fixing this bug before the upcoming release, the risk of breaking the release in a way that might be even worse is too high, and besides, this causes too much effort to be resolved before release. Instead, i'm adding an entry to the TODO file: - eqn(7) delimiters cause conditional lines to misbehave nabijaczleweli 8 Sep 2021 15:24:48 +0200 loc * exist *** algo *** size * imp * Thanks for reporting! Ingo -- To unsubscribe send an email to tech+unsubscribe@mandoc.bsd.lv