[Pkg-tcltk-devel] [bjarniig at simnet.is: Tcl_NRCreateCommand.3tcl: Some remarks and a patch with editorial changes for this man page]

Bjarni Ingi Gislason bjarniig at simnet.is
Wed May 27 02:07:36 BST 2026


  Additional remarks.

  Mails from me to "submit at bugs.debian.org" are no longer acknowledged.  A
Debian maintainer told me, that he would contact the mail administrator
about me not wanting to send bugs upstream.

----- Forwarded message from Bjarni Ingi Gislason <bjarniig at simnet.is> -----

Date: Tue, 26 May 2026 01:15:54 +0000
From: Bjarni Ingi Gislason <bjarniig at simnet.is>
To: Debian Bug Tracking System <submit at bugs.debian.org>
Subject: Tcl_NRCreateCommand.3tcl: Some remarks and a patch with editorial changes for this man page
X-Mailer: reportbug 13.2.0

Package: tcl8.6-doc
Version: 8.6.18+dfsg-1
Severity: minor
Tags: patch upstream

Dear Maintainer,

>From "/usr/share/doc/debian/bug-reporting.txt.gz":

  Don't file bugs upstream

   If you file a bug in Debian, don't send a copy to the upstream software
   maintainers yourself, as it is possible that the bug exists only in
   Debian. If necessary, the maintainer of the package will forward the
   bug upstream.

-.-

  For forwarding bug reports to upstream see:

https://www.debian.org/Bugs/Developer#forward

-.-

  "Handling bug reports" in
http://people.debian.org/~enrico/dcg/ch03s02.html

-.-

  I do not send reports upstream if I have to get an account there.
The Debian maintainers have one already.

  If I get a negative (or no) response from upstream, I send henceforth
bugs to Debian.

-.-

   * What led up to the situation?

     Checking for defects with a new version

test-[g|n]roff -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=0 -ww -z < "man page"

  [Use 

grep -n -e ' $' -e '\\~$' -e ' \\f.$' -e ' \\"' <file>

  to find (most) trailing spaces.]

  ["test-groff" is a script in the repository for "groff"; is not shipped]
(local copy and "troff" slightly changed by me).

  [The fate of "test-nroff" was decided in groff bug #55941.]

   * What was the outcome of this action?

Output from "test-groff  -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=0 -ww -z ":

troff:<stdin>:336: warning: register '^v' not defined [-w reg]
troff:<stdin>:382: warning: name 'The' not defined [-w mac]

   * What outcome did you expect instead?

     No output (no warnings).

-.-

  General remarks and further material, if a diff-file exist, are in the
attachments.


-- System Information:
Debian Release: forky/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 7.0.7+deb14-amd64 (SMP w/2 CPU threads; PREEMPT)
Locale: LANG=is_IS.iso88591, LC_CTYPE=is_IS.iso88591 (charmap=ISO-8859-1), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: sysvinit (via /sbin/init)

tcl8.6-doc depends on no packages.

tcl8.6-doc recommends no packages.

Versions of packages tcl8.6-doc suggests:
ii  tcl8.6  8.6.18+dfsg-1

-- no debconf information

Input file is Tcl_NRCreateCommand.3tcl

Output from "mandoc -T lint  Tcl_NRCreateCommand.3tcl": (shortened list)

      1 ERROR: skipping unknown macro
      2 STYLE: input text line longer than 80 bytes
      4 WARNING: skipping paragraph macro

-.-.

Output from
test-nroff -mandoc -t -Kutf8 -ww -z Tcl_NRCreateCommand.3tcl: (shortened list)

      1 name 'The' not defined [-w mac]

-.-.

Find a repeated word

! 440 --> a

-.-.

Wrong distance (not two spaces, not a new line character (\n)) between
sentences in the input file.

  Separate the sentences and subordinate clauses; each begins on a new
line.  See man-pages(7) ("Conventions for source file layout") and
"info groff" ("Input Conventions").

  The best procedure is to always start a new sentence on a new line,
at least, if you are typing on a computer.

Remember coding: Only one command ("sentence") on each (logical) line.

E-mail: Easier to quote exactly the relevant lines.

Generally: Easier to edit the sentence.

Patches: Less unaffected text.

Search for two adjacent words is easier, when they belong to the same line,
and the same phrase.

  The amount of space between sentences in the output can then be
controlled with the ".ss" request.

Mark a final abbreviation point as such by suffixing it with "\&".

Some sentences (etc.) do not begin on a new line.

Split (sometimes) lines after a punctuation mark; before a conjunction.

  Lines with only one (or two) space(s) between sentences could be split,
so latter sentences begin on a new line.

Use

#!/usr/bin/sh

sed -e '/^\./n' \
-e 's/\([[:alpha:]]\)\.  */\1.\n/g' $1

to split lines after a sentence period.
Check result with the difference between the formatted outputs.
See also the attachment "general.bugs"

501:Copyright \(co 2008 Kevin B. Kenny.

-.-.

Split lines longer than 80 characters (fill completely
an A4 sized page line on a terminal)
into two or more lines.
Appropriate break points are the end of a sentence and a subordinate
clause; after punctuation marks.

Line 278, length 174

Tcl_NRCreateCommand, Tcl_NRCallObjProc, Tcl_NREvalObj, Tcl_NREvalObjv, Tcl_NRCmdSwap, Tcl_NRExprObj, Tcl_NRAddCallback \- Non-Recursive (stackless) evaluation of Tcl scripts.

Line 497, length 120

Tcl_CreateCommand(3tcl), Tcl_CreateObjCommand(3tcl), Tcl_EvalObjEx(3tcl), Tcl_GetCommandFromObj(3tcl), Tcl_ExprObj(3tcl)

-.-.

Add a zero (0) in front of a decimal fraction that begins with a period
(.)

243:.ta .25i .5i .75i 1i

-.-.

The escape "\s[1-9][0-9]" is fragile, use "(" with two digits:
"\s(ij.
Use the "\s(0[1-9]" form for one digit cases

152:.ie n 'mc \s12\(br\s0

-.-.

Only one space character is after a possible end of sentence
(after a punctuation, that can end a sentence).

Tcl_NRCreateCommand.3tcl:501:Copyright \(co 2008 Kevin B. Kenny.

-.-.

Change comment lines of type '.\" ====', '.\" ---', and an empty
'.\"' line) to a single period, as they contain no information and waste
work each time they are processed.

1:.\"
4:.\"
11:.\"
18:.\"
23:.\"
27:.\"
30:.\"
33:.\"
36:.\"
43:.\"
46:.\"
49:.\"
52:.\"
58:.\"
61:.\"
67:.\"
70:.\"
73:.\"
77:.\"
109:.\"

-.-.

Output from "test-groff  -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=0 -ww -z ":

troff:<stdin>:336: warning: register '^v' not defined [-w reg]
troff:<stdin>:382: warning: name 'The' not defined [-w mac]

-.-

Generally:

Split (sometimes) lines after a punctuation mark; before a conjunction.

-.-

Tables:

  Use the preprocessor 'tbl' to make tables.

  Put data, that are wider than the header in the (centered) last column,
in a "T{...\nT}" block(, when the table gets wider than the output line).

  Table headings, that are wider than any data in the corresponding
column, do not need to be centered, so left adjustment (l, L) is
sufficient.


--- Tcl_NRCreateCommand.3tcl	2026-05-26 00:59:57.700134277 +0000
+++ Tcl_NRCreateCommand.3tcl.new	2026-05-26 00:52:12.844413450 +0000
@@ -1,80 +1,80 @@
-.\"
+.
 .\" Copyright (c) 2008 Kevin B. Kenny.
 .\" Copyright (c) 2018 Nathan Coulter.
-.\"
+.
 '\" See the file "license.terms" for information on usage and redistribution
 '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
 '\"
 .TH NRE 3tcl 8.6 Tcl "Tcl Library Procedures"
 .\" The -*- nroff -*- definitions below are for supplemental macros used
 .\" in Tcl/Tk manual entries.
-.\"
+.
 .\" .AP type name in/out ?indent?
 .\"	Start paragraph describing an argument to a library procedure.
 .\"	type is type of argument (int, etc.), in/out is either "in", "out",
 .\"	or "in/out" to describe whether procedure reads or modifies arg,
 .\"	and indent is equivalent to second arg of .IP (shouldn't ever be
 .\"	needed;  use .AS below instead)
-.\"
+.
 .\" .AS ?type? ?name?
 .\"	Give maximum sizes of arguments for setting tab stops.  Type and
 .\"	name are examples of largest possible arguments that will be passed
 .\"	to .AP later.  If args are omitted, default tab stops are used.
-.\"
+.
 .\" .BS
 .\"	Start box enclosure.  From here until next .BE, everything will be
 .\"	enclosed in one large box.
-.\"
+.
 .\" .BE
 .\"	End of box enclosure.
-.\"
+.
 .\" .CS
 .\"	Begin code excerpt.
-.\"
+.
 .\" .CE
 .\"	End code excerpt.
-.\"
+.
 .\" .VS ?version? ?br?
 .\"	Begin vertical sidebar, for use in marking newly-changed parts
 .\"	of man pages.  The first argument is ignored and used for recording
 .\"	the version when the .VS was added, so that the sidebars can be
 .\"	found and removed when they reach a certain age.  If another argument
 .\"	is present, then a line break is forced before starting the sidebar.
-.\"
+.
 .\" .VE
 .\"	End of vertical sidebar.
-.\"
+.
 .\" .DS
 .\"	Begin an indented unfilled display.
-.\"
+.
 .\" .DE
 .\"	End of indented unfilled display.
-.\"
+.
 .\" .SO ?manpage?
 .\"	Start of list of standard options for a Tk widget. The manpage
 .\"	argument defines where to look up the standard options; if
 .\"	omitted, defaults to "options". The options follow on successive
 .\"	lines, in three columns separated by tabs.
-.\"
+.
 .\" .SE
 .\"	End of list of standard options for a Tk widget.
-.\"
+.
 .\" .OP cmdName dbName dbClass
 .\"	Start of description of a specific option.  cmdName gives the
 .\"	option's name as specified in the class command, dbName gives
 .\"	the option's name in the option database, and dbClass gives
 .\"	the option's class in the option database.
-.\"
+.
 .\" .UL arg1 arg2
 .\"	Print arg1 underlined, then print arg2 normally.
-.\"
+.
 .\" .QW arg1 ?arg2?
 .\"	Print arg1 in quotes, then arg2 normally (for trailing punctuation).
-.\"
+.
 .\" .PQ arg1 ?arg2?
 .\"	Print an open parenthesis, arg1 in quotes, then arg2 normally
 .\"	(for trailing punctuation) and then a closing parenthesis.
-.\"
+.
 .\"	# Set up traps and other miscellaneous stuff for Tcl/Tk man pages.
 .if t .wh -1.3i ^B
 .nr ^l \n(.l
@@ -106,7 +106,7 @@
 .nr )A 10n
 .if !"\\$1"" .nr )A \\w'\\$1'u+3n
 .nr )B \\n()Au+15n
-.\"
+.
 .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n
 .nr )C \\n()Bu+\\w'(in/out)'u+2n
 ..
@@ -135,7 +135,7 @@
 .ie !\\n(^b-1 \{\
 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
 .\}
-.el \}\
+.el \{\
 \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
 .\}
 .\}
@@ -149,8 +149,8 @@
 .de VS
 .if !"\\$2"" .br
 .mk ^Y
-.ie n 'mc \s12\(br\s0
-.el .nr ^v 1u
+.if n 'mc \s(12\(br\s0
+.nr ^v 1
 ..
 .\"	# VE - end of vertical sidebar
 .de VE
@@ -181,6 +181,7 @@
 .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
 .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
 .\}
+.nr ^v +0\" define register if not defined
 .if \\n(^v \{\
 .nr ^x \\n(^tu+1v-\\n(^Yu
 \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c
@@ -240,7 +241,7 @@ Database Class:	\\fB\\$3\\fR
 .de CS
 .RS
 .nf
-.ta .25i .5i .75i 1i
+.ta 0.25i 0.5i 0.75i 1i
 ..
 .\"	# CE - end code excerpt
 .de CE
@@ -275,7 +276,9 @@ Database Class:	\\fB\\$3\\fR
 ..
 .BS
 .SH NAME
-Tcl_NRCreateCommand, Tcl_NRCallObjProc, Tcl_NREvalObj, Tcl_NREvalObjv, Tcl_NRCmdSwap, Tcl_NRExprObj, Tcl_NRAddCallback \- Non-Recursive (stackless) evaluation of Tcl scripts.
+Tcl_NRCreateCommand, Tcl_NRCallObjProc, Tcl_NREvalObj, Tcl_NREvalObjv, \
+Tcl_NRCmdSwap, Tcl_NRExprObj, Tcl_NRAddCallback \- Non-Recursive \
+(stackless) evaluation of Tcl scripts.
 .SH SYNOPSIS
 .nf
 \fB#include <tcl.h>\fR
@@ -329,7 +332,6 @@ Words in the command.
 A script or expression to evaluate.
 .AP int flags in
 As described for \fITcl_EvalObjv\fR.
-.PP
 .AP Tcl_Command cmd in
 Token to use instead of one derived from the first word of \fIobjv\fR in order
 to evaluate a command.
@@ -346,7 +348,6 @@ A function to push.
 to the function designated by \fIpostProcPtr\fR when it is invoked.
 .BE
 .SH DESCRIPTION
-.PP
 These functions provide an interface to the function stack that an interpreter
 iterates through to evaluate commands.  The routine behind a command is
 implemented by an initial function and any additional functions that the
@@ -379,7 +380,7 @@ consumes no space on the C stack.
 \fBTcl_NRCmdSwap\fR is like \fBTcl_NREvalObjv\fR, but uses \fIcmd\fR, a token
 previously returned by \fBTcl_CreateObjCommand\fR or
 \fBTcl_GetCommandFromObj\fR, instead of resolving the first word of \fIobjv\fR.
-.  The name of this command must be the same as \fIobjv[0]\fR.
+The name of this command must be the same as \fIobjv[0]\fR.
 .PP
 \fBTcl_NRExprObj\fR pushes a function that evaluates \fIobjPtr\fR as an
 expression in the same manner as \fBTcl_ExprObj\fR but without consuming space
@@ -405,7 +406,6 @@ typedef int
 \fIresult\fR is the value returned by the previous function implementing part
 the routine.
 .SH EXAMPLE
-.PP
 The following command uses \fBTcl_EvalObjEx\fR, which consumes space on the C
 stack, to evalute a script:
 .PP
@@ -437,7 +437,7 @@ To avoid consuming space on the C stack,
 function, \fITheCmdPostProc\fR, which is pushed onto the function stack.
 \fITcl_EvalObjEx\fR is replaced with \fITcl_NREvalObj\fR, which uses a
 trampoline instead of consuming space on the C stack.  A new version of
-\fITheCmdOldObjProc\fR is just a a wrapper that uses \fBTcl_NRCallObjProc\fR to
+\fITheCmdOldObjProc\fR is just a wrapper that uses \fBTcl_NRCallObjProc\fR to
 call \fITheCmdNRObjProc\fR:
 .PP
 .CS
@@ -492,11 +492,14 @@ int
 .PP
 Any function comprising a routine can push other functions, making it possible
 implement looping and sequencing constructs using the function stack.
-.PP
 .SH "SEE ALSO"
-Tcl_CreateCommand(3tcl), Tcl_CreateObjCommand(3tcl), Tcl_EvalObjEx(3tcl), Tcl_GetCommandFromObj(3tcl), Tcl_ExprObj(3tcl)
+.BR Tcl_CreateCommand (3tcl),
+.BR Tcl_CreateObjCommand (3tcl),
+.BR Tcl_EvalObjEx (3tcl),
+.BR Tcl_GetCommandFromObj (3tcl),
+.BR Tcl_ExprObj (3tcl)
 .SH KEYWORDS
 stackless, nonrecursive, execute, command, global, value, result, script
 .SH COPYRIGHT
-Copyright \(co 2008 Kevin B. Kenny.
+Copyright \(co 2008 Kevin B.\& Kenny.
 Copyright \(co 2018 Nathan Coulter.

  Any program (person), that produces man pages, should check the output
for defects by using (both groff and nroff)

[gn]roff -mandoc -t -ww -b -z -K utf8 <man page>

  To find most trailing spaces use

grep -n -e ' $' -e ' \\f.$' -e ' \\"' <man page>

  The same goes for man pages that are used as an input.

-.-

  For a style guide use

  mandoc -T lint

-.-

  For general input conventions consult the man page "nroff(7)" (item
"Input conventions") or the Texinfo manual about the same item.

-.-

  Any "autogenerator" should check its products with the above mentioned
'groff', 'mandoc', and additionally with 'nroff ...'.

  It should also check its input files for too long (> 80) lines.

  This is just a simple quality control measure.

  The "autogenerator" may have to be corrected to get a better man page,
the source file may, and any additional file may.

-.-

  Common defects:

  Not removing trailing spaces (in in- and output).
  The reason for these trailing spaces should be found and eliminated.

  "git" has a "tool" to point out whitespace,
see for example "git-apply(1)" and git-config(1)")

-.-

  Not beginning each input sentence on a new line.

Line length and patch size should thus be reduced when that has been fixed.

  The script "reportbug" uses 'quoted-printable' encoding when a line is
longer than 1024 characters in an 'ascii' file.

  See man-pages(7), item "semantic newline".

-.-

The difference between the formatted output of the original
and patched file can be seen with:

  nroff -mandoc <file1> > <out1>
  nroff -mandoc <file2> > <out2>
  diff -d -u <out1> <out2>

and for groff, using

\"printf '%s\n%s\n' '.kern 0' '.ss 12 0' | groff -mandoc -Z - \"

instead of 'nroff -mandoc'

  Add the option '-t', if the file contains a table.

  Read the output from 'diff -d -u ...' with 'less -R' or similar.

-.-.

  If 'man' (man-db) is used to check the manual for warnings,
the following must be set:

  The option "-warnings=w"

  The environmental variable:

export MAN_KEEP_STDERR=yes (or any non-empty value)

  or

  (produce only warnings):

export MANROFFOPT="-ww -b -z"

export MAN_KEEP_STDERR=yes (or any non-empty value)

-.-


----- End forwarded message -----



More information about the Pkg-tcltk-devel mailing list