Package: plocate Version: 1.1.22-3 Severity: minor Tags: patch * What led up to the situation?
Checking for defects with [test-]groff -mandoc -t -K utf8 -rF0 -rHY=0 -ww -b -z < "man page" [test-groff is a script in the repository for "groff"] (local copy and "troff" slightly changed by me). * What was the outcome of this action? troff: backtrace: file '<stdin>':92 troff:<stdin>:92: warning: trailing space in the line * What outcome did you expect instead? No output (no warnings). -.- General remarks and further material (declared as a "diff" file) are in the attachments. -- System Information: Debian Release: trixie/sid APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 6.10.6-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 plocate depends on: ii adduser 3.137 ii libc6 2.40-2 ii libgcc-s1 14.2.0-3 ii libstdc++6 14.2.0-3 ii liburing2 2.7-1 ii libzstd1 1.5.6+dfsg-1 plocate recommends no packages. Versions of packages plocate suggests: pn systemd-sysv | nocache <none> pn systemd-sysv | powermgmt-base <none> -- no debconf information
Any program (person), that produces man pages, should check its content for defects by using groff -mandoc -t -ww -b -z [ -K utf8 | k ] <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 errors: 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 (that is not confined to a markup) in the first column. Line length should thus be reduced. -.- The difference between the formatted outputs 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 plocate.1": (possibly shortened list) mandoc: plocate.1:68:90: STYLE: input text line longer than 80 bytes: exits with status co... mandoc: plocate.1:90:81: STYLE: input text line longer than 80 bytes: Find matches in the ... mandoc: plocate.1:92:77: STYLE: whitespace at end of input line mandoc: plocate.1:111:81: STYLE: input text line longer than 80 bytes: in particular, searc... mandoc: plocate.1:138:81: STYLE: input text line longer than 80 bytes: when it is to be pro... -.-. Remove space characters at the end of lines. Use "git apply ... --whitespace=fix" to fix extra space issues, or use global configuration "core.whitespace". 92:It is also possible to give multiple databases in one argument, separated by -.-. Use "\e" to print the escape character instead of "\\" (which gets interpreted in copy mode). 94:(Any character, including : and \\, can be escaped by prepending a \\.) -.-. Use a macro to change to the italic font, instead of \fI, if possible (see man-pages(7)). The macros have the italic corrections, but "\c" removes the "\/" part, which is in the macro. So "\/" must be added between the italic argument and the "\c" string. 89:\fB\-d\fR, \fB\-\-database\fR \fIDBPATH\fR 111:in particular, searching for \fIÃ\fR will not give you matches on \fIss\fR 117:\fB\-l\fR, \fB\-\-limit\fR \fILIMIT\fR 122:is given, the number printed out will be at most \fILIMIT\fR. -.-. Wrong distance between sentences. 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. N.B. The number of lines affected can be too large to be in the patch. 13:of the patterns if multiple are given). It does this by means of 22:faster. In particular, it rarely needs to scan through its entire 24:or you want to search for a regular expression. It does not try to 26:and locales. Most I/O is done asynchronously, but the results are 33:of them. This is the main incompatibility with 39:If at least one non-escaped globbing metacharacter (*, ? or []) is given, 41:to start and end in * for a substring match). If 66:were passed. Otherwise, 80:(but still printed). This does not speed up the search, 85:Do not print each match. Instead, count them, and print out a total 100:is run. Note that unlike 108:(default is case-sensitive, byte-by-byte match). Note that 112:even in a German locale. Also note that this option will be 120:matches have been found. If 126:Print entry names without quoting. Normally, 137:(ASCII 0). This is useful for creating unambiguous output 146:for more information. Note that this forces a linear scan 158:Match against the entire path name. This is the default, 160:anything. This option thus exists only as compatibility with 181:Steinar H. Gunderson <steinar+ploc...@gunderson.no> -.-. Split lines longer than 80 characters into two or more lines. Appropriate break points are the end of a sentence and a subordinate clause; after punctuation marks. Line 68, length 90 exits with status code 1, indicating that an error occurred or that no matches were found. Line 90, length 81 Find matches in the given database, instead of \fB/var/lib/plocate/plocate.db\fR. Line 138, length 81 when it is to be processed by other tools (like \fBxargs\fP(1)), as filenames are -.-. Output from "test-groff -b -mandoc -rF0 -rHY=0 -K utf8 -t -ww -z ": troff: backtrace: file '<stdin>':92 troff:<stdin>:92: warning: trailing space in the line -.- Additionally Mark an abbreviation point with '\&'.
--- plocate.1 2024-08-10 10:10:58.662756718 +0000 +++ plocate.1.new 2024-09-01 09:38:12.398210480 +0000 @@ -4,8 +4,8 @@ plocate \- find files by name, quickly .SH SYNOPSIS .B plocate -.I "[OPTION]..." -.I "PATTERN..." +.RI [ OPTION ]... +.IR PATTERN ... .SH DESCRIPTION .B plocate @@ -65,7 +65,8 @@ or .B \-\-version were passed. Otherwise, .B plocate -exits with status code 1, indicating that an error occurred or that no matches were found. +exits with status code 1, +indicating that an error occurred or that no matches were found. .SH OPTIONS .TP @@ -87,11 +88,13 @@ number at the end. .TP \fB\-d\fR, \fB\-\-database\fR \fIDBPATH\fR -Find matches in the given database, instead of \fB/var/lib/plocate/plocate.db\fR. +Find matches in the given database, +instead of \fB/var/lib/plocate/plocate.db\fR. This argument can be given multiple times, to search multiple databases. -It is also possible to give multiple databases in one argument, separated by +It is also possible to give multiple databases in one argument, +separated by .BR : . -(Any character, including : and \\, can be escaped by prepending a \\.) +(Any character, including : and \e, can be escaped by prepending a \e.) .TP \fB\-e\fR, \fB\-\-existing\fR @@ -108,7 +111,8 @@ Do a case-insensitive match as given by (default is case-sensitive, byte-by-byte match). Note that .B plocate does not support the full range of Unicode case folding rules; -in particular, searching for \fIÃ\fR will not give you matches on \fIss\fR +in particular, +searching for \fIÃ\fR will not give you matches on \fIss\fR even in a German locale. Also note that this option will be somewhat slower than a case-sensitive match, since it needs to generate more candidates for searching the index. @@ -135,8 +139,9 @@ turn off such quoting. \fB\-0\fR, \fB\-\-null\fR Instead of writing a newline after every match, write a NUL (ASCII 0). This is useful for creating unambiguous output -when it is to be processed by other tools (like \fBxargs\fP(1)), as filenames are -allowed to contain embedded newlines. +when it is to be processed by other tools +(like \fBxargs\fP(1)), +as filenames are allowed to contain embedded newlines. .TP \fB\-r\fR, \fB\-\-regexp\fR @@ -178,7 +183,7 @@ Colon-delimiting and character escaping as for \fB\-\-database\fR. .SH AUTHOR -Steinar H. Gunderson <steinar+ploc...@gunderson.no> +Steinar H.\& Gunderson <steinar+ploc...@gunderson.no> .SH SEE ALSO \fBplocate\-build\fP(8),