[Pkg-tcltk-devel] Bug#1094211: wish8.6.1: Some remarks and a patch with editorial changes for this man page

Bjarni Ingi Gislason bjarniig at simnet.is
Sun Jan 26 03:41:34 GMT 2025


Package: tk8.6
Version: 8.6.16-1
Severity: minor
Tags: patch

   * 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=10 -ww -z < "man page"

  [Use "groff -e ' $' -e '\\~$' <file>" to find obvious 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?

troff:<stdin>:362: warning: register '^v' not defined

   * 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: trixie/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 6.12.9-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)

Versions of packages tk8.6 depends on:
ii  libc6      2.40-5
ii  libtcl8.6  8.6.16+dfsg-1
ii  libtk8.6   8.6.16-1

tk8.6 recommends no packages.

tk8.6 suggests no packages.

-- no debconf information
-------------- next part --------------
Input file is wish8.6.1

Output from "mandoc -T lint  wish8.6.1": (shortened list)

      6 skipping paragraph macro: PP after SH

-.-.

Output from "test-groff -mandoc -t -ww -z wish8.6.1": (shortened list)

      1 register '^v' not defined

-.-.

Add a comma (or \&) after "e.g." and "i.e.", or use English words
(man-pages(7)).
Abbreviation points should be protected against being interpreted as
an end of sentence, if they are not, and that independent of the
current place on the line.

306:way as the value for the \fB\-use\fR option for toplevel widgets (i.e.

-.-.

Wrong distance 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 "\&".

360:is instead a windowed program. Because of this, it additionally

-.-.

The name of a man page is typeset in bold and the section in roman
(see man-pages(7)).

481:tclsh(1), toplevel(n), Tk_Main(3), Tk_MainLoop(3), Tk_MainWindow(3)

-.-.

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

-.-.

Put a parenthetical sentence, phrase on a separate line,
if not part of a code.
See man-pages(7), item "semantic newline".

wish8.6.1:290:Display (and screen) on which to display window.
wish8.6.1:389:Contains a count of the number of \fIarg\fR arguments (0 if none),

-.-.

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

troff:<stdin>:362: warning: register '^v' not defined

-.-

Additional:

Register '^v' does not need a unit.

Define the register '^v' for both n- and t-mode outside of a macro.

Define the register ^Y in macro ^B if undefined.
-------------- next part --------------
--- wish8.6.1	2025-01-26 02:13:17.057800228 +0000
+++ wish8.6.1.new	2025-01-26 03:37:58.765434503 +0000
@@ -146,11 +146,14 @@
 .\"	# VS - start vertical sidebar
 .\"	# ^Y = starting y location
 .\"	# ^v = 1 (for troff;  for nroff this doesn't matter)
+.\" Define ^v outside of a macro, it is also used in macro ^B
+.ie n .nr ^v 0
+.el .nr ^v 1
+.
 .de VS
 .if !"\\$2"" .br
 .mk ^Y
-.ie n 'mc \s12\(br\s0
-.el .nr ^v 1u
+.if n 'mc \s(12\(br\s0
 ..
 .\"	# VE - end of vertical sidebar
 .de VE
@@ -182,6 +185,7 @@
 .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
 .\}
 .if \\n(^v \{\
+.nr ^Y +0\" define if undefined
 .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 +244,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
@@ -303,7 +307,7 @@ execution, but it is useful for debuggin
 Specifies that the main window for the application is to be embedded in
 the window whose identifier is \fIid\fR, instead of being created as an
 independent toplevel window.  \fIId\fR must be specified in the same
-way as the value for the \fB\-use\fR option for toplevel widgets (i.e.
+way as the value for the \fB\-use\fR option for toplevel widgets (i.e.,
 it has a form like that returned by the \fBwinfo id\fR command).
 .RS
 Note that on some platforms this will only work correctly if \fIid\fR
@@ -321,7 +325,6 @@ This provides a mechanism for passing ar
 to a script instead of having \fBwish\fR interpret them.
 .BE
 .SH DESCRIPTION
-.PP
 \fBWish\fR is a simple program consisting of the Tcl command
 language, the Tk toolkit, and a main program that reads commands
 from standard input or from a file.
@@ -357,17 +360,16 @@ but the script file can always \fBsource
 Note that on Windows, the \fBwish\fIversion\fB.exe\fR program varies
 from the \fBtclsh\fIversion\fB.exe\fR program in an additional
 important way: it does not connect to a standard Windows console and
-is instead a windowed program. Because of this, it additionally
+is instead a windowed program.
+Because of this, it additionally
 provides access to its own \fBconsole\fR command.
 .SH "OPTION PROCESSING"
-.PP
 \fBWish\fR automatically processes all of the command-line options
 described in the \fBOPTIONS\fR summary above.
 Any other command-line arguments besides these are passed through
 to the application using the \fBargc\fR and \fBargv\fR variables
 described later.
 .SH "APPLICATION NAME AND CLASS"
-.PP
 The name of the application, which is used for purposes such as
 \fBsend\fR commands, is taken from the \fB\-name\fR option,
 if it is specified;  otherwise it is taken from \fIfileName\fR,
@@ -382,7 +384,6 @@ specifying options with a \fBRESOURCE_MA
 file, is the same as its name except that the first letter is
 capitalized.
 .SH "VARIABLES"
-.PP
 \fBWish\fR sets the following Tcl variables:
 .TP 15
 \fBargc\fR
@@ -411,7 +412,6 @@ Contains 1 if \fBwish\fR is reading comm
 was not specified and standard input is a terminal-like
 device), 0 otherwise.
 .SH "SCRIPT FILES"
-.PP
 If you create a Tcl script in a file whose first line is
 .CS
 \fB#!/usr/local/bin/wish\fR
@@ -464,7 +464,6 @@ or
 .QW \eu001a ;
 or may generate it by use of commands such as \fBformat\fR or \fBbinary\fR.
 .SH PROMPTS
-.PP
 When \fBwish\fR is invoked interactively it normally prompts for each
 command with
 .QW "\fB% \fR" .
@@ -478,7 +477,8 @@ a newline is typed but the current comma
 if \fBtcl_prompt2\fR is not set then no prompt is output for
 incomplete commands.
 .SH "SEE ALSO"
-tclsh(1), toplevel(n), Tk_Main(3), Tk_MainLoop(3), Tk_MainWindow(3)
+.BR tclsh "(1), " toplevel "(n), " Tk_Main "(3), " Tk_MainLoop "(3), " \
+Tk_MainWindow (3)
 .SH KEYWORDS
 application, argument, interpreter, prompt, script file, shell,
 toolkit, toplevel
-------------- next part --------------
  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>

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

  For a style guide use

  mandoc -T lint

-.-

  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.

  Not beginning each input sentence on a new line.
Line length should thus be reduced.

  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 -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 -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)

-.-


More information about the Pkg-tcltk-devel mailing list