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 27104 invoked from network); 13 Aug 2020 23:22:19 -0000 Received: from bsd.lv (HELO mandoc.bsd.lv) (66.111.2.12) by inbox.vuxu.org with ESMTPUTF8; 13 Aug 2020 23:22:18 -0000 Received: from fantadrom.bsd.lv (localhost [127.0.0.1]) by mandoc.bsd.lv (OpenSMTPD) with ESMTP id 5ef587d2 for ; Thu, 13 Aug 2020 18:22:12 -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 c7ecf156 for ; Thu, 13 Aug 2020 18:22:12 -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 1k6MXx-0001Is-J4; Fri, 14 Aug 2020 01:22:11 +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 1k6MXv-0006Ky-Ht; Fri, 14 Aug 2020 01:22:07 +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 1k6MXv-0003Lb-D2; Fri, 14 Aug 2020 01:22:07 +0200 Received: from localhost (athene.usta.de [local]) by athene.usta.de (OpenSMTPD) with ESMTPA id 48664ec1; Fri, 14 Aug 2020 01:22:07 +0200 (CEST) Date: Fri, 14 Aug 2020 01:22:07 +0200 From: Ingo Schwarze To: o@krj.st Cc: discuss@mandoc.bsd.lv Subject: Re: Option to disable sentence spacing in tty output? Message-ID: <20200813232207.GB46177@athene.usta.de> References: X-Mailinglist: mandoc-discuss Reply-To: discuss@mandoc.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.2 (2019-09-21) Hello, k.st wrote on Thu, Aug 13, 2020 at 10:12:44PM +0000: > Is there currently an option in mandoc to disable sentence spacing, > i.e. 2 spaces after end-of-sentence character, in tty outputs? No. See also: https://man.openbsd.org/roff.7#ss > I noticed that many man page authors either do not follow semantic > line-breaking or convert man pages from other formats such as asciidoc, > pandoc, and scdoc. All of them has some problems handling sentence > spaces and lead to inconsistent spacing in man pages. My philosophy is "garbage in, garbage out". Encourage authors to write correct source code. Encourage software developers of man(7) generators to produce better quality in their generators - though admittedly, pod2man(1) is already good enough and all others are basically unmaintained, hopeless crap, with DocBook by far the worst of all, markdown also quite bad, scdoc a very sloppy niche product, and pandoc virtually unused by any real-world software. Rest and ASCIIdoc aren't really good either. None of that seems likely to change. Sometimes, when really serious problems are very widespread and have devastating consequences, implementing fully automatic workarounds that fix stuff up without needing any user intervention can help users, but workarounds for issues of little to no importance just encourage laziness and bad practice for no relevant benefit. > Since sentence spacing can lead to inconsistent spacings, I think > it is reasonable to have an option to disable sentence spacing > entirely I don't agree. I don't believe in low-importance options. To warrant an option, something must be *really* of major importance, or the downside of making the documentation longer outweighs the utility of the new feature. Dealing with minor glitches in the output of broken man(7) generators is clearly very far from being a sufficient reason for adding an option. Heck, the whole man(7) language has been obsolete for more than two decades, so anything related to the man(7) language, even if much more important, is not a good enough reason for adding an option. > and let user choose which convention to use. That seems pretty irrelevant to me: bells and whistles... > groff uses `.ss` request to control it, but in mandoc this seems to be > hardcoded in `term.c`: > > if ((p->flags & TERMP_NOSPACE) == 0) { > if ((p->flags & TERMP_KEEP) == 0) { > bufferc(p, ' '); > if (p->flags & TERMP_SENTENCE) > bufferc(p, ' '); > } else > bufferc(p, ASCII_NBRSP); > } > > We essentially only need to add a check before printing the second > space. Respecting .ss would be easy indeed, but that would amount to letting the *author* choose rather than the user, which would likely result in less rather than in more consistency, and which would provide no benefit whatsoever. > Since mandoc deals with man pages only, maybe it would make sense > to implement this as a command-line argument, similar to --nj and --nh > flags from man-db's man(1)? getopt_long? Over my dead body. But i don't think there is the slightest chance for building a sufficiently good argument for -O frenchspacing either. Configurability is not a goal for manual page display. Instead, what matters is a consistent style that people can get used to. Gratuitiously changing the existing style also isn't something i like to do. Yours, Ingo -- To unsubscribe send an email to discuss+unsubscribe@mandoc.bsd.lv