Hi Russ,

Ah, I'll reply to this message first 'cause I think it'll get us to the
crux of the issue faster.

You have compelled me to take another run at illustrating the problem
and proposed solution in a more concrete, step-by-step manner, which
should be more helpful to everyone.

At 2025-08-24T13:59:18-0700, Russ Allbery wrote:
> "G. Branden Robinson" <g.branden.robin...@gmail.com> writes:
>
> > You don't have to change anything about podlators regarding this
> > issue, of course; you can regard it as a bug in all _groff_ releases
> > to date and, if we implement the change proposed in this thread, it
> > will be one that groff 1.24 fixes.  Maybe not at the formatter level
> > where you expect, but one at which POD documentation will experience
> > the remedy nevertheless.
>
> I'm not sure that I understand. The output is correct right now with
> groff 1.23.0.  The input literal text has two spaces after "no id!"
> and so does the current nroff output.

...only in the English "groff locale", and only if the site does not
meddle with the amount of inter-sentence spacing.

...meddle in such a way as to achieve your preference in Message-Id:
<87cy8kh22m....@hope.eyrie.org>,[1] as it happens.

> I assumed that the second output you showed in your message was the
> intended output after the change you were proposing, in which case I
> think my opinion is that the new output would be incorrect.

No--if you mean the two examples I think you do, I was illustrating how
things go wrong if the amount of supplemental inter-sentence space is
_not_ the formatter-plus-English-"groff locale"'s default.

Here's a revised example, avoiding `EX`/`EE` involvement--just
manipulating filling--and using the `"` character at issue.

$ cat ATTIC/sentence-ending-in-unfilled-text.man
.TH foo 1 2025-08-24 "groff test suite"
.SH Name
foo \- frobnicate a bar
.SH Description
Let's learn how to use
.MR find 1
effectively.
Its
.B \-name
predicate takes a \[lq]glob\[rq] as an argument,
not a \[lq]regex\[rq].
Further,
it is wise to protect this argument from interpretation by the shell.
.P
.nf
find . \-name "*.*"    \-print # list files with "extensions"
find . \-name "*.cc"   \-print # list some C++ source files
find . \-name "*.[ch]" \-print # list most C source files
.fi

Here's how the foregoing formats with all the defaults as groff ships
(except for the line length, which I shorten for the sake of this mail).

$ nroff -r LL=65n -man -Tascii ATTIC/sentence-ending-in-unfilled-text.man
foo(1)               General Commands Manual               foo(1)

Name
     foo - frobnicate a bar

Description
     Let's learn how to use find(1) effectively.  Its -name pred-
     icate  takes  a  "glob" as an argument, not a "regex".  Fur-
     ther, it is wise to protect this argument  from  interpreta-
     tion by the shell.

     find . -name "*.*"    -print # list files with "extensions"
     find . -name "*.cc"   -print # list some C++ source files
     find . -name "*.[ch]" -print # list most C source files

groff test suite            2025-08-24                     foo(1)

Now let's move the page to France.

$ nroff -r LL=65n -man -mfr -Tascii ATTIC/sentence-ending-in-unfilled-text.man
foo(1)            Manuel des commandes generales           foo(1)

Name
     foo - frobnicate a bar

Description
     Let's learn how to use find(1) effectively. Its -name predi-
     cate  takes a "glob" as an argument, not a "regex". Further,
     it is wise to protect this argument from  interpretation  by
     the shell.

     find . -name "*.*" -print # list files with "extensions"
     find . -name "*.cc"   -print # list some C++ source files
     find . -name "*.[ch]" -print # list most C source files

groff test suite            2025-08-24                     foo(1)

Observe how the `-print` arguments and shell comments no longer align.

Now let's alter the document to simulate the impact of my proposed
change.

$ diff -u ATTIC/sentence-ending-in-unfilled-text.man 
ATTIC/sentence-ending-in-unfilled-text-with-cflags-request.man
--- ATTIC/sentence-ending-in-unfilled-text.man  2025-08-24 16:53:21.422155323 
-0500
+++ ATTIC/sentence-ending-in-unfilled-text-with-cflags-request.man      
2025-08-24 16:53:11.846199444 -0500
@@ -1,4 +1,5 @@
 .TH foo 1 2025-08-24 "groff test suite"
+.cflags 0 "
 .SH Name
 foo \- frobnicate a bar
 .SH Description

And render it in the default/English locale...

$ nroff -r LL=65n -man -Tascii 
ATTIC/sentence-ending-in-unfilled-text-with-cflags-request.man
foo(1)               General Commands Manual               foo(1)

Name
     foo - frobnicate a bar

Description
     Let's learn how to use find(1) effectively.  Its -name pred-
     icate  takes  a  "glob" as an argument, not a "regex".  Fur-
     ther, it is wise to protect this argument  from  interpreta-
     tion by the shell.

     find . -name "*.*"    -print # list files with "extensions"
     find . -name "*.cc"   -print # list some C++ source files
     find . -name "*.[ch]" -print # list most C source files

groff test suite            2025-08-24                     foo(1)

...and the French one.

$ nroff -r LL=65n -man -mfr -Tascii 
ATTIC/sentence-ending-in-unfilled-text-with-cflags-request.man
foo(1)            Manuel des commandes generales           foo(1)

Name
     foo - frobnicate a bar

Description
     Let's learn how to use find(1) effectively. Its -name predi-
     cate  takes a "glob" as an argument, not a "regex". Further,
     it is wise to protect this argument from  interpretation  by
     the shell.

     find . -name "*.*"    -print # list files with "extensions"
     find . -name "*.cc"   -print # list some C++ source files
     find . -name "*.[ch]" -print # list most C source files

groff test suite            2025-08-24                     foo(1)

For "the French locale", we can substitute "every (Western) locale groff
supports other than English", because of how we configure them...

$ git grep -w ss tmac/[a-z][a-z].tmac
tmac/cs.tmac:.ss 12 0
tmac/de.tmac:.ss 12 0
tmac/en.tmac:.ss 12
tmac/es.tmac:.ss 12 0
tmac/fr.tmac:.ss 12 0
tmac/it.tmac:.ss 12 0
tmac/ru.tmac:.ss 12 0
tmac/sv.tmac:.ss 12 0

...and any site that takes up groff_man_style(7)'s offer to configure
the supplemental inter-sentence space amount to zero, which you noted
was your personal preference.

groff_man_style(7):
     /.../share/groff/site-tmac/man.local
            Put site‐local changes and customizations into this file.

                   .\" Put only one space after the end of a sentence.
                   .ss 12 0 \" See groff(7).
                   .\" Keep pages narrow even on wide terminals.
                   .if n .if \n[LL]>80n .nr LL 80n

> Maybe I'm just missing the point of your example entirely.

Does the foregoing help?

Regards,
Branden

[1] https://lists.gnu.org/archive/html/groff/2025-08/msg00036.html

Attachment: signature.asc
Description: PGP signature

Reply via email to