groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Warn on semantic newlines


From: Ingo Schwarze
Subject: Re: Warn on semantic newlines
Date: Sat, 18 Jun 2022 13:23:11 +0200

Hi Alexandro,

Alejandro Colomar wrote on Fri, Jun 10, 2022 at 05:47:40PM +0200:

[ ... warning about a comma in the middle of an input line ]
> Yeah, just have this floating around in your mind, and if you find a 
> solution some day that's great; otherwise, it looks like an impossible 
> thing.  Maybe mandoc(1) has it different?

In mandoc(1), such a warning would be trivial to implement
but completely undesirable.

> On 6/10/22 14:16, G. Branden Robinson wrote:

>> No, that's not correct.  GNU troff has supported a '-W' flag to
>> disable warnings of the type given in the argument since 1991 or
>> earlier.  It goes all the way back to day one of our Git history.

> Ahh, right.  It was maybe with mandoc(1) that I had issues...

Indeed, mandoc(1) intentionally does not provide a feature to disable
individual messages or groups of messages (called "warning categories"
in the troff(1) manual page).  Besides, i dimly remember from past
experiences that the GNU troff categories are poorly designed and
named, some excessively narrow, some excessively broad, some
misleadingly named, and in general very unsystematic.
These deficiencies are typical for such classification attempts
in most software; usually, such attempts work out very poorly.

[...]
> BTW, I guess the "no-op escape" \& can be used to silence this warning, 
> right?

You are refering to the comma-warning you propose, but i'll answer
for the existing "new sentence, new line", warning:

With mandoc(1), yes.  If two alphanumeric characters and a period
are followed by "\&", one to three unescaped space characters, 
and a capital letter, mandoc(1) does not issue the "new sentence,
new line" warning because the period is not followed by an
unescaped space character.  In some situations, that can be used
to mark a period as ending an abbreviation rather than ending a
sentence.  But since captital letters are relatively rare in the
middle of English sentences, this kind of escaping is rarely needed
in practice.

Yours,
  Ingo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]