#1071615 lesskey.1: some remarks and editorial changes for this man page

Package:
less
Source:
less
Description:
pager program similar to more
Submitter:
Bjarni Ingi Gislason
Date:
2024-05-22 13:03:03 UTC
Severity:
normal
Tags:
#1071615#5
Date:
2024-05-22 12:58:57 UTC
From:
To:
Dear Maintainer,

  here are some notes and editorial fixes for the manual.

The patch is in the attachment.

-.-

The difference between the formatted outputs can be seen with:

  nroff -man <file1> > <out1>
  nroff -man <file2> > <out2>
  diff -u <out1> <out2>

and for groff, using

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

instead of "nroff -man"

  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 -z"

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

-.-.

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

mandoc: lesskey.1:14:42: STYLE: whitespace at end of input line
mandoc: lesskey.1:19:24: STYLE: whitespace at end of input line
mandoc: lesskey.1:23:24: STYLE: whitespace at end of input line
mandoc: lesskey.1:24:12: STYLE: whitespace at end of input line
mandoc: lesskey.1:32:2: WARNING: skipping paragraph macro: PP empty
mandoc: lesskey.1:129:29: STYLE: whitespace at end of input line
mandoc: lesskey.1:132:2: ERROR: skipping unknown macro: .less
mandoc: lesskey.1:371:86: STYLE: input text line longer than 80 bytes: If a line begins wit...
mandoc: lesskey.1:380:76: STYLE: whitespace at end of input line
mandoc: lesskey.1:383:86: STYLE: input text line longer than 80 bytes: Then the following l...

-.-.

Remove space characters at the end of lines.

Use "git apply ... --whitespace=fix" to fix extra space issues, or use
global configuration "core.whitespace".

14:This document describes the format of the
19:In previous versions of
23:was used to compile the
24:.B lesskey
129:default command keys used by
234:	## Use a long option name by starting the
380:For example, suppose that a new command named 'sideways-search' is added in

-.-.

Change two HYPHEN-MINUSES (code 0x2D) to an em-dash (\(em),
if one is intended.  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 "-" (end of options) then use "\-\-".

lesskey.1:419:	##  to separate the --color option from the -S option.)

-.-.

Change -- in x--y to \(em (em-dash), or, if an
option, to \-\-

419:	##  to separate the --color option from the -S option.)

-.-.

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.

236:	##   s toggle-option -log-file\en
419:	##  to separate the --color option from the -S option.)

-.-.

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.

385:which support it. The line would be ignored by versions earlier than 777.

-.-.

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.

lesskey.1: line 85 length 101
\ek followed by a single character represents the char(s) produced when one of these keys is pressed:

lesskey.1: line 371 length 86
If a line begins with #version followed by a relational operator and a version number,

lesskey.1: line 383 length 86
Then the following line would assign the command to the Q key, but only in versions of

-.-

Remove space characters at the end of lines.

Use "git apply ... --whitespace=fix" to fix extra space issues, or use
global configuration "core.whitespace".

128:	## Use a long option name by starting the

-.-.

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.

130:	##   s toggle-option -log-file\en

-.-.

Output from "test-groff -b -mandoc -dAD=l -rF0 -rHY=0 -t -w w -z -rCHECKSTYLE=0":
troff: backtrace: file '<stdin>':14
troff:<stdin>:14: warning: trailing space in the line
troff: backtrace: file '<stdin>':19
troff:<stdin>:19: warning: trailing space in the line
troff: backtrace: file '<stdin>':23
troff:<stdin>:23: warning: trailing space in the line
troff: backtrace: file '<stdin>':129
troff:<stdin>:129: warning: trailing space in the line
troff: backtrace: file '<stdin>':132
troff:<stdin>:132: warning: macro 'less' not defined
troff: backtrace: file '<stdin>':234
troff:<stdin>:234: warning: trailing space in the line
troff: backtrace: file '<stdin>':380
troff:<stdin>:380: 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