groff
[Top][All Lists]
Advanced

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

Re: warning on mid-input line sentence endings (was: Warn on semantic ne


From: G. Branden Robinson
Subject: Re: warning on mid-input line sentence endings (was: Warn on semantic newlines)
Date: Sun, 23 Oct 2022 12:22:24 -0500

At 2022-07-17T09:18:28-0500, Dave Kemper wrote:
> On 7/16/22, G. Branden Robinson <g.branden.robinson@gmail.com> wrote:
> > I think a new, writable troff register would be a better way to
> > manipulate this feature--which is basically a style diagnostic--than
> > a warning category.
> 
> This suggests that one day there might be other warnings that fall
> into the style-diagnostic category, and thus that establishing a
> common prefix, maybe "sd*" or "style-", would be helpful to group all
> these knobs together.

My sentiments have shifted back to the warning category approach on this
because I have identified two further roff language-level style nits
that it seems worth warning about.

1.  Giving a macro a quoted argument without a closing quote.

Example: .MAC foo "bar" "baz

2.  Calling a request with the no-break control character when that has
    no effect.

Examples: 'nr a 1
          'tm this is my error message

It's evidently hard for people to keep the list of requests that imply a
break in their heads, and it's worse for them to suppose changed
behavior when the no-break control character is used when that's not
going to happen.  I think doing so can lead a cascade of bad
suppositions about the formatter's behavior.

Our Texinfo manual calls out both of these practices as poor style.

So I will probably allocate some more slots in our precious 32-bit .warn
register to these, and add a pseudo-category "extra" analogous to "all"
and "w".

Names for the individual warning categories are still TBD, as is the
inclusion of "w" in "extra".

This will be post-groff 1.23 release work.  Anybody wondering how that
is going should consider subscribing to the bug-groff and/or
groff-commit lists.

> > "sentence." seems too broad and too vague.
> 
> True, but with a prefix establishing it as a style diagnostic, a vague
> following term might be OK.

With it back under the umbrella of a warning category, I think it's
easier to get away with the term "sentence".

Regards,
Branden

Attachment: signature.asc
Description: PGP signature


reply via email to

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