From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from scc-mailout.scc.kit.edu (scc-mailout.scc.kit.edu [129.13.185.201]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id p93M0Ujg022112 for ; Mon, 3 Oct 2011 18:00:31 -0400 (EDT) Received: from hekate.usta.de (asta-nat.asta.uni-karlsruhe.de [172.22.63.82]) by scc-mailout-01.scc.kit.edu with esmtp (Exim 4.72 #1) id 1RAqYn-0008OZ-7K; Tue, 04 Oct 2011 00:00:29 +0200 Received: from donnerwolke.usta.de ([172.24.96.3]) by hekate.usta.de with esmtp (Exim 4.72) (envelope-from ) id 1RAqYn-0003M5-6r for tech@mdocml.bsd.lv; Tue, 04 Oct 2011 00:00:29 +0200 Received: from iris.usta.de ([172.24.96.5] helo=usta.de) by donnerwolke.usta.de with esmtp (Exim 4.72) (envelope-from ) id 1RAqYn-0003zL-5Y for tech@mdocml.bsd.lv; Tue, 04 Oct 2011 00:00:29 +0200 Received: from schwarze by usta.de with local (Exim 4.72) (envelope-from ) id 1RAqYn-0000qH-4k for tech@mdocml.bsd.lv; Tue, 04 Oct 2011 00:00:29 +0200 Date: Tue, 4 Oct 2011 00:00:29 +0200 From: Ingo Schwarze To: tech@mdocml.bsd.lv Subject: Re: -Tman with -mman Message-ID: <20111003220029.GG20053@iris.usta.de> References: <4E887D72.9090605@bsd.lv> <20111002154058.GA14208@britannica.bec.de> <4E88C13D.6090708@bsd.lv> X-Mailinglist: mdocml-tech Reply-To: tech@mdocml.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4E88C13D.6090708@bsd.lv> User-Agent: Mutt/1.5.21 (2010-09-15) Hi Kristaps, Kristaps Dzonsons wrote on Sun, Oct 02, 2011 at 09:53:33PM +0200: > On 02/10/2011 17:40, Joerg Sonnenberger wrote: >> On Sun, Oct 02, 2011 at 05:04:18PM +0200, Kristaps Dzonsons wrote: >>> What sort of behaviour is most reasonable when providing a man >>> manual to the new -Tman? I think this should be ironed out before >>> the release. The mandoc manual says "-Tman only with mdoc" and, if >>> man is provided to -Tman, outputs nothing (like -Tlint). >>> >>> It makes the most sense to me to output the original file (after >>> preprocessing, I guess). All this requires is a duplicate buffer in >>> read.c (conditional on -Tman being present to avoid overhead in >>> normal usage). I don't like the idea of putting out an error (or >>> nothing at all) because it special-cases modes for input. >> Agreed, just giving back the original input (maybe reformatted) sounds >> like the best approach. I agree that makes sense if the code is parsed (.man -> AST) and then freshly formatted (AST -> .man) in the sense of a validating, normalizing parser. Oops, now that i think about it, maybe i went the wrong way with mdoc -> man? Maybe i should have implemented that as a two-step translation? First mdoc-AST -> man-AST, then man-AST -> man-code? Maybe i should start over? Hm... > Putting some code to the idea... Not that i'm really opposed to your small patch - but i'm not sure this is terribly useful either, so far it's mostly a fancy cat(1). In case we maybe want to implement a real normalizing parser later, i'm both OK with erroring out until we get there or putting in your fancy cat(1). > (Sorry for the churn, I ordered the > mandoc.h functions. They're the same except for the mandoc_keep() > and mandoc_getkeep() additions). This isn't quite commit-ready, but > a start. Basically, I ask for a keep buffer if OUTT_MAN is > specified. This needed some machinery to expose the parser to the > front-end. > > Thoughts? Well, as a placeholder for something better later, the general idea seems OK. Yours, Ingo -- To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv