Path: csiph.com!3.us.feeder.erje.net!feeder.erje.net!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail From: "G. Branden Robinson" Newsgroups: gnu.groff.bug Subject: [bug #57583] [PATCH] s.tmac: Test the default number for warnings for nroff Date: Tue, 4 Feb 2020 17:32:56 -0500 (EST) Lines: 73 Approved: bug-groff@gnu.org Message-ID: References: <20200112-081117.sv93188.50403@savannah.gnu.org> <20200204-074740.sv108747.85719@savannah.gnu.org> <20200204-140242.sv97361.94849@savannah.gnu.org> <20200204-220421.sv93188.46040@savannah.gnu.org> <20200204-223256.sv108747.25653@savannah.gnu.org> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain;charset=UTF-8 X-Trace: usenet.stanford.edu 1580855583 29109 209.51.188.17 (4 Feb 2020 22:33:03 GMT) X-Complaints-To: action@cs.stanford.edu To: "G. Branden Robinson" , Bjarni Ingi Gislason , Ingo Schwarze , bug-groff@gnu.org Envelope-to: bug-groff@gnu.org X-PHP-Originating-Script: 1001:sendmail.php X-Savane-Server: savannah.gnu.org:443 [209.51.188.79] X-Savane-Project: groff X-Savane-Tracker: bugs X-Savane-Item-ID: 57583 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0 PureBrowser/60.9.0 X-Apparently-From: 1.129.105.184 (Savane authenticated user gbranden) In-Reply-To: <20200204-220421.sv93188.46040@savannah.gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.79 X-BeenThere: bug-groff@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Bug reports for the GNU version of nroff, troff et al" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <20200204-223256.sv108747.25653@savannah.gnu.org> X-Mailman-Original-References: <20200112-081117.sv93188.50403@savannah.gnu.org> <20200204-074740.sv108747.85719@savannah.gnu.org> <20200204-140242.sv97361.94849@savannah.gnu.org> <20200204-220421.sv93188.46040@savannah.gnu.org> Xref: csiph.com gnu.groff.bug:1716 Follow-up Comment #4, bug #57583 (project groff): > Your own wording is wrong. You're right. > 1) .\" Enable warnings (only if none are given on the command line). groff(7) does not document what .warn with no arguments does. That's a problem. .warn with no arguments _turns all warnings on_. But even so, you're not testing what was given on the command-line. This comment, which predates your patch, is misleading. Warnings don't keep track of what set them. You don't know how the \n[.warn] register got set to the value it has. What I _think_ you're doing is checking the value of this register against the current (groff 1.22.4) default, judging by the following experiment: $ for TS in utf8 ps; do printf '.tm \\n[.warn]\n' | groff -T$TS; done 1114119 1245191 Someone could specify a sequence of -w and -W arguments that reproduce the default, and falsify your comment, because you'd still turn all the warnings on. So, you're right, my wording was incorrect. It should have been "tmac/s.tmac: Enable all warnings in nroff mode if warning register has its default value." Your patch makes more sense to me now. I don't know if it is good policy for the macro package to be doing this, but your patch makes its behavior more consistent with what its intention appears to be; the original implementer perhaps did not think about nroff mode, or didn't care, or this code dates back to a time when the \n[.warn] values did not differ between the modes. Interestingly, the `.nroff` and `.troff` requests do not affect `\n[.warn]`: $ groff .warn 1 .tm \n[.warn] 1 .nroff .tm \n[.warn] 1 .troff .tm \n[.warn] 1 As none of these are classical roff requests I suppose we can revisit the issue of whether the above is good behavior. Regarding starting sentences on new lines, that's fine material for a different bug/patch. _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via Savannah https://savannah.gnu.org/