Package: sensible-utils
Version: 0.0.25
Severity: minor
Tags: patch
* What led up to the situation?
Output for the synopsis section looked wrong.
Trailing space detected.
-.-
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 6.12.38+deb13-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)
-- no debconf information
Input file is sensible-terminal.1
Output from "mandoc -T lint sensible-terminal.1": (shortened list)
1 STYLE: whitespace at end of input line
Find most trailing spaces with:
grep -n -e ' $' -e ' \\f.$' -e ' \\"' <man page>
-.-.
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
1
-.-.
Change two HYPHEN-MINUSES (code 0x2D) to an em-dash (\(em),
if one is intended.
" \(em " creates a too big gap in the text (in "troff").
An en-dash is usually surrounded by a space,
while an em-dash is used without spaces.
"man" (1 byte characters in input) transforms an en-dash (\(en) to one
HYPHEN-MINUS,
and an em-dash to two HYPHEN-MINUSES without considering the space
around it.
If "--" are two single "-"
(begin of an option or end of options)
then use "\-\-".
7:.RI [-T title] [--wait] [-e cmd...]
-.-.
Change -- in x--y to \(em (em-dash), or, if an
option, to \-\-
7:.RI [-T title] [--wait] [-e cmd...]
-.-.
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.
7:.RI [-T title] [--wait] [-e cmd...]
16:.B sh -c
-.-.
Put a parenthetical sentence, phrase on a separate line,
if not part of a code.
See man-pages(7), item "semantic newline".
23:/usr/share/doc/debian-policy (you might need to install debian-policy)
-.-.
Remove quotes when there is a printable
but no space character between them
and the quotes are not for emphasis (markup),
for example as an argument to a macro.
sensible-terminal.1:2:.TH SENSIBLE-TERMINAL 1 "28 Aug 2022" "Debian"
sensible-terminal.1:18:.SH "STANDARD"
-.-.
Space character after a macro call.
6:.B sensible-terminal
-.-.
Generally:
Split (sometimes) lines after a punctuation mark; before a conjunction.
--- sensible-terminal.1 2025-08-22 19:53:17.718972986 +0000
+++ sensible-terminal.1.new 2025-08-22 20:19:38.334958204 +0000
@@ -3,8 +3,8 @@
.SH NAME
sensible-terminal \- sensible terminal emulator
.SH SYNOPSIS
-.B sensible-terminal
-.RI [-T title] [--wait] [-e cmd...]
+.B sensible-terminal
+.RB [ \-T "\,\fItitle\/\fR] [" \-\-wait "] [" \-e \,\fIcmd\fR ...]
.SH DESCRIPTION
.B sensible-terminal-emulator
makes sensible decisions on which terminal emulator to call.
@@ -13,7 +13,7 @@ as their default terminal emulator or em
.B TERMINAL_EMULATOR
environment variable could be set, and will be used if set.
Any string acceptable as a command_string operand to the
-.B sh -c
+.B sh \-c
command shall be valid.
.SH "STANDARD"
Documentation of behavior of
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 trailing space 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.
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)
-.-