Package: expect
Version: 5.45.4-3+b1
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 -ww -z < "man page"

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


an.tmac:<stdin>:1: style: .TH missing fourth argument; consider package/project 
name and version (e.g., "groff 1.23.0")
troff:<stdin>:130: warning: trailing space in the line
troff:<stdin>:230: warning: trailing space in the line
troff:<stdin>:240: warning: trailing space in the line
an-end-check:<stdin>: Warning: Different number of .RS and .RE calls, 
an-RS-open=1 at end of file

   * 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.11.10-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 expect depends on:
ii  libc6       2.40-4
ii  libtcl8.6   8.6.15+dfsg-2
ii  tcl-expect  5.45.4-3+b1
ii  tcl8.6      8.6.15+dfsg-2

expect recommends no packages.

Versions of packages expect suggests:
ii  tk8.6  8.6.15-1

-- no debconf information
Input file is expect_kibitz.1

  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

-.-

  So any 'generator' should check its products with the above mentioned
'groff', 'mandoc',  and additionally with 'nroff ...'.

  This is just a simple quality control measure.

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

  Common defects:

  Input text line longer than 80 bytes.

  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.
Lines should thus be shorter.

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


-.-.

Output from "mandoc -T lint  expect_kibitz.1": (shortened list)

      4 whitespace at end of input line

-.-.

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

      3 trailing space in the line

-.-.

Remove space characters (whitespace) at the end of lines.
Use "git apply ... --whitespace=fix" to fix extra space issues, or use
global configuration "core.whitespace".

Number of lines affected is

4

-.-.

Change a HYPHEN-MINUS (code 0x2D) to a minus(-dash) (\-),
if it
is in front of a name for an option,
is a symbol for standard input,
is a single character used to indicate an option,
or is in the NAME section (man-pages(7)).
N.B. - (0x2D), processed as a UTF-8 file, is changed to a hyphen
(0x2010, groff \[u2010] or \[hy]) in the output.

132:.B -proxy
142:.B -noescape
144:.B -escape
177:    % xterm -e kibitz    will work
244:.B -proxy

-.-.

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.

130:for the remote login (e.g. if your account on the remote computer has a 

-.-.

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 abbreviation point as such by suffixing them with "\\&".


124:to the remote computer with your current username. The flag
130:for the remote login (e.g. if your account on the remote computer has a 
131:different username). If the
206:The default prompt r.e. is "($|%|#)\ ".
238:occur while logging in). See also CAVEATS above.
243:to a remote computer. See description of the
259:Vol. 23, No. 5, May, 1993.

-.-.

Name of a manual is set in bold, the section in roman.
See man-pages(7).

87:can provide various effects.  For example, you can emulate a two-way write(1)

-.-.

Put a parenthetical sentence, phrase on a separate line,
if not part of a code.
See man-pages(7), item "semantic newline".
Not considered in a patch, too many lines.


expect_kibitz.1:67:types ^D (and the shell accepts this to be EOF), the shell 
terminates
expect_kibitz.1:135:tries to determine your current username by (in that order) 
inspecting the
expect_kibitz.1:166:but supports the ability to add additional users (and drop 
them)

-.-.

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

an.tmac:<stdin>:1: style: .TH missing fourth argument; consider package/project 
name and version (e.g., "groff 1.23.0")
troff:<stdin>:130: warning: trailing space in the line
troff:<stdin>:230: warning: trailing space in the line
troff:<stdin>:240: warning: trailing space in the line
an-end-check:<stdin>: Warning: Different number of .RS and .RE calls, 
an-RS-open=1 at end of file

-.-.

  Additionally (general):

  Abbreviations get a '\&' added after their final full stop (.) to mark them
as such and not as an end of a sentence.
--- expect_kibitz.1     2024-12-17 02:28:48.940874582 +0000
+++ expect_kibitz.1.new 2024-12-17 02:37:17.463276327 +0000
@@ -21,8 +21,9 @@ kibitz \- allow two people to interact w
 ]
 .SH INTRODUCTION
 .B kibitz
-allows two (or more) people to interact with one shell (or any arbitrary
-program).  Uses include:
+allows two (or more) people to interact with one shell
+(or any arbitrary program).
+Uses include:
 .RS
 .TP 4
 \(bu
@@ -42,6 +43,7 @@ save the entire conversation, or even ed
 People can team up on games, document editing, or other cooperative
 tasks where each person has strengths and weaknesses that complement one
 another.
+.RE
 .SH USAGE
 To start
 .BR kibitz ,
@@ -52,8 +54,10 @@ user to kibitz.  For example:
        kibitz user2
 
 .B kibitz
-starts a new shell (or another program, if given on the command
-line), while prompting user2 to run
+starts a new shell
+(or another program,
+if given on the command line),
+while prompting user2 to run
 .BR kibitz .
 If user2 runs
 .B kibitz
@@ -64,17 +68,21 @@ shell.
 To terminate
 .B kibitz
 it suffices to terminate the shell itself.  For example, if either user
-types ^D (and the shell accepts this to be EOF), the shell terminates
-followed by
+types ^D
+(and the shell accepts this to be EOF),
+the shell terminates followed by
 .BR kibitz .
 
-Normally, all characters are passed uninterpreted.  However, if the
-escape character (described when
+Normally, all characters are passed uninterpreted.
+However, if the escape character
+(described when
+.B kibitz
+starts)
+is issued,
+the user may talk directly to the
 .B kibitz
-starts) is issued, the user
-may talk directly to the
-.B kibitz
-interpreter.  Any
+interpreter.
+Any
 .BR Expect (1)
 or
 .BR Tcl (3)
@@ -84,7 +92,8 @@ suspend or restart
 .BR kibitz .
 
 Various processes
-can provide various effects.  For example, you can emulate a two-way write(1)
+can provide various effects.  For example, you can emulate a two-way
+.BR write (1)
 session with the command:
 
        kibitz user2 sleep 1000000
@@ -121,33 +130,39 @@ to user2 on a remote computer,
 .B kibitz
 performs a
 .B rlogin
-to the remote computer with your current username. The flag
+to the remote computer with your current username.
+The flag
 .BI \-proxy " username"
 causes
 .B rlogin
 to use
 .I username
-for the remote login (e.g. if your account on the remote computer has a 
-different username). If the
-.B -proxy
+for the remote login
+(e.g., if your account on the remote computer has a different username).
+If the
+.B \-proxy
 flag is not given,
 .B kibitz
-tries to determine your current username by (in that order) inspecting the
-environment variables USER and LOGNAME, then by using the commands
+tries to determine your current username by
+(in that order)
+inspecting the environment variables USER and LOGNAME,
+then by using the commands
 .B whoami
 and
 .BR logname .
 
 The arguments
-.B -noescape
+.B \-noescape
 and
-.B -escape
+.B \-escape
 can also be given by user2 when prompted to run
 .BR kibitz .
 
 .SH MORE THAN TWO USERS
 The current implementation of kibitz explicitly understands only two users,
-however, it is nonetheless possible to have a three (or more) -way kibitz,
+however, it is nonetheless possible to have a three
+(or more)
+-way kibitz,
 by kibitzing another
 .BR kibitz .
 For example, the following command runs
@@ -163,7 +178,8 @@ The
 .B xkibitz
 script is similar to
 .B kibitz
-but supports the ability to add additional users (and drop them)
+but supports the ability to add additional users
+(and drop them)
 dynamically.
 .SH CAVEATS
 .B kibitz
@@ -174,12 +190,12 @@ If this assumption is incorrect, graphic
 handles character graphics, but cannot handle bitmapped graphics.  Thus,
 .nf
 
-       % xterm -e kibitz    will work
+       % xterm \-e kibitz    will work
        % kibitz xterm       will not work
 
 .fi
 However, you can get the effect of the latter command by using
-.B xkibitz 
+.B xkibitz
 (see SEE ALSO below).
 .B kibitz
 uses the same permissions as used by rlogin, rsh, etc.  Thus, you
@@ -199,11 +215,12 @@ needs to distinguish your prompt from ot
 during login.
 (Ideally, the end of it is preferred but any part should suffice.)
 If you have an unusual prompt,
-set the environment variable EXPECT_PROMPT to an egrep(1)-style
+set the environment variable EXPECT_PROMPT to an
+.BR egrep (1)-style
 regular expression.
 Brackets should be preceded with one backslash in ranges,
 and three backslashes for literal brackets.
-The default prompt r.e. is "($|%|#)\ ".
+The default prompt r.e.\& is "($|%|#)\ ".
 
 .B kibitz
 requires the
@@ -217,8 +234,8 @@ By comparison, the
 .B xkibitz
 script uses the X authorization mechanism for inter-host communication
 so it does not need to login, recognize your prompt, or require kibitz
-on the remote host.  It does however need permission to access
-the other X servers.
+on the remote host.
+It does however need permission to access the other X servers.
 .SH BUGS
 An early version of Sun's tmpfs had a bug in it that causes
 .B kibitz
@@ -227,21 +244,24 @@ to blow up.  If
 reports "error flushing ...: Is a directory"
 ask Sun for patch #100174.
 
-If your Expect is not compiled with multiple-process support (i.e., you do not 
-have a working select or poll), you will not be able to run kibitz.
+If your Expect is not compiled with multiple-process support
+(i.e., you do not have a working select or poll),
+you will not be able to run kibitz.
 .SH ENVIRONMENT
-The environment variable SHELL is used to determine the shell to start, if no
-other program is given on the command line.
+The environment variable SHELL is used to determine the shell to start,
+if no other program is given on the command line.
 
 If the environment variable EXPECT_PROMPT exists, it is taken as a regular
-expression which matches the end of your login prompt (but does not otherwise
-occur while logging in). See also CAVEATS above.
+expression which matches the end of your login prompt
+(but does not otherwise occur while logging in).
+See also CAVEATS above.
 
-If the environment variables USER or LOGNAME are defined, they are used to 
+If the environment variables USER or LOGNAME are defined, they are used to
 determine the current user name for a
 .B kibitz
-to a remote computer. See description of the
-.B -proxy
+to a remote computer.
+See description of the
+.B \-proxy
 option in ARGUMENTS above.
 .SH SEE ALSO
 .BR Tcl (3),
@@ -256,7 +276,7 @@ O'Reilly and Associates, January 1995.
 .I
 "Kibitz \- Connecting Multiple Interactive Programs Together", \fRby Don Libes,
 Software \- Practice & Experience, John Wiley & Sons, West Sussex, England,
-Vol. 23, No. 5, May, 1993.
+Vol.\& 23, No.\& 5, May, 1993.
 .SH AUTHOR
 Don Libes, National Institute of Standards and Technology
 

Reply via email to