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.2 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.4 Received: (qmail 15828 invoked from network); 13 Oct 2023 10:22:12 -0000 Received: from bsd.lv (HELO mandoc.bsd.lv) (66.111.2.12) by inbox.vuxu.org with ESMTPUTF8; 13 Oct 2023 10:22:12 -0000 Received: from fantadrom.bsd.lv (localhost [127.0.0.1]) by mandoc.bsd.lv (OpenSMTPD) with ESMTP id 3c514bf8 for ; Fri, 13 Oct 2023 10:22:11 +0000 (UTC) Received: from mx2.freebsd.org (mx2.freebsd.org [96.47.72.81]) by mandoc.bsd.lv (OpenSMTPD) with ESMTP id 9673c3ae for ; Fri, 13 Oct 2023 10:22:11 +0000 (UTC) Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits)) (Client CN "mx1.freebsd.org", Issuer "R3" (verified OK)) by mx2.freebsd.org (Postfix) with ESMTPS id 4S6Mxv1pjFz3S0j for ; Fri, 13 Oct 2023 10:22:11 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S6Mxv14BLz4XBd for ; Fri, 13 Oct 2023 10:22:11 +0000 (UTC) (envelope-from bapt@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697192531; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=UPp2RY8ojyMYP9gLOdUdrFVuauVfR1ZmakobZ1knCLc=; b=ENZ9AYUYIFmvLYhUiujfgl1s5K006l367aIl96G1MOEBQ/1Pv1F9eUv3Dwk0RYUv0o3A10 gvGN9aLsbu1BV+cQBV3FDIStjA+IbaCeD5Wmd70lDsn+VTJlI4BDem1u9HmSA5y9i3wPoM zoUwcAz5lS7bQ/MkhlWlUIfSrwQNv1+ePc9sSCMitXQ62cSnneJtfJa5b/p7CfoMDzU7PX JnupqPln62DcHPZgAZsGToPhxsQ4W/Ggp+Qn/KOyoBMHsymq1ztxyBfTUXiEewlidXXMQL Orr/oYSis3aMqBuS5nQ4PCTbHG7KGcox3vqgyVSqjMKv3r5wGg9PrhXP7QpECA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697192531; a=rsa-sha256; cv=none; b=kXtPsbVxYrSXGFhUr5keyUGxzOGpRX1v/0g43mBAsT894bZQk24Z6G3wN/aTxU9GjnnJLf fzIp+CFFWFApqO0DqTDPnddrHz96x8ut29L34bNDvoLAlKRNyZRiaIrEWq/Bmv2gQ4fCwB fHJFYJC3EN96R3eJR3h/mt/l4FdqzKdqVmpKwuzNs6UsM9FN199elFNLtXasE4OF5g153v fW1Cg+P/ECNw8sKdYQ9yRD38LqndYJWyD/7avsV6u8UEelZ/U9i1afSSXdRVZUSdzSxMTU VoK7HAkjKFoX/GcKPBxHbVa3v3xE5FZZL3DdJ5gd5ecuP8s42wmLdh6JmivDqQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697192531; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=UPp2RY8ojyMYP9gLOdUdrFVuauVfR1ZmakobZ1knCLc=; b=GliGgLauTj81zj2IOvJWAIskDW8qoGeJwnL1yvhqosLHM6e/rLCama1h3lh00nb3IANkgi 7nmS1PB0DMsKYX15pq8firIfxEhvOoGAq0G8FZ/zt+Sus2Jq3P4S/EMDfERIdmQqpHFYFh N8OV+TBg/6ngyd++RTlfxR2t7HvygQ5BTIwGasU6LpgngWzxDX5lBjnUNsVerCn5Ky0Nk2 AiGdiL5Y0g9HZs/IJIKwOTAqsMCh4mcZtn10jV3S73ybmmsGTFkAk2LpXyfXhrREUJtVWg oVt93LIDelgP2M/JHc+CcNlkMYhJ8UEYkpBdLYOomlO9G/MEHKz2JxPC3B5sIg== Received: from aniel.nours.eu (nours.eu [176.31.115.77]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: bapt) by smtp.freebsd.org (Postfix) with ESMTPSA id 4S6Mxt6fCGz1Fb9 for ; Fri, 13 Oct 2023 10:22:10 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: by aniel.nours.eu (Postfix, from userid 1001) id 55D821399F1; Fri, 13 Oct 2023 12:22:09 +0200 (CEST) Date: Fri, 13 Oct 2023 12:22:09 +0200 From: Baptiste Daroussin To: tech@mandoc.bsd.lv Subject: Re: Naive patch for handling empty input Message-ID: References: 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: On Fri, Oct 13, 2023 at 12:13:49PM +0200, Ingo Schwarze wrote: > Hi Bapt, > > Baptiste Daroussin wrote on Fri, Oct 13, 2023 at 09:30:18AM +0200: > > > Please find attached a naive patch to handle dealing with empty > > Why would you want to do anything like that? > > While empty input is valid low-level roff(7) input, it is not a valid > manual page. While mandoc(1) wants to be compatible with groff > in manual pages, it is not a goal to be compatible with respect to > each and every low-level roff(7) feature outside of manual pages. > > > This is probably a two naive approach, but I didn't want to come > > with empty hands :D > > > > the issue is the following: > > ./mandoc > > > before the patch is show 3 lines > > after nothing > > I guess which approach makes sense for empty input depends on the > reasons *why* you want to handle empty input in any particular way. > So far, i cannot think of any possible reasons. > > Also, where do you want to stop? > > Do you want the output of > > echo foo | mandoc > > to become compatible with > > echo foo | groff -ket -ww -mtty-char -Tascii -P -c > > If yes, your patch is indeed much too naive. > If not, what is so special about empty input compared to other > low-level roff(7) non-manual-page input? > I was looking for compatibility with groff like you showed above, this is an "issue" a user reported, he was expecting to have an empty output if provided an empty input, but if the current behaviour is how you think mandoc should behave, I am fine with closing the report with work as intended. Best regards, Bapt -- To unsubscribe send an email to tech+unsubscribe@mandoc.bsd.lv