Package: less Version: 643-1 Severity: minor Tags: patch 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 -- System Information: Debian Release: trixie/sid APT prefers testing-proposed-updates APT policy: (500, 'testing-proposed-updates'), (500, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 6.7.12-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 less depends on: ii libc6 2.38-11 ii libtinfo6 6.5-2 less recommends no packages. less suggests no packages. -- no debconf information
--- lesskey.1 2024-05-22 03:03:10.955858550 +0000 +++ lesskey.1.new 2024-05-22 03:41:05.728992846 +0000 @@ -11,17 +11,17 @@ lesskey \- customize key bindings for le .br .B "lesskey \-\-version" .SH SCOPE -This document describes the format of the +This document describes the format of the .B lesskey source file, which is used by .B less version 582 and later. -In previous versions of +In previous versions of .BR less , a separate program called .B lesskey -was used to compile the -.B lesskey +was used to compile the +.B lesskey source file into a format understood by .BR less . This compilation step is no longer required and the @@ -29,7 +29,6 @@ This compilation step is no longer requi program is therefore deprecated, although the file format remains supported by .B less itself. -.PP .SH DESCRIPTION A .B lesskey @@ -73,6 +72,7 @@ specify a character by its octal value. A backslash followed by certain characters specifies input characters as follows: .RS 5m +.sp 1v .TS l l l. \eb BACKSPACE (0x08) @@ -82,7 +82,9 @@ l l l. \et TAB (0x09) .TE .sp -\ek followed by a single character represents the char(s) produced when one of these keys is pressed: +\ek followed by a single character represents the char(s) produced when one +of these keys is pressed: +.sp 1v .TS l l. \ekb BACKSPACE (the BACKSPACE key) @@ -103,7 +105,7 @@ l l. \ekX ctrl-DELETE \ek1 F1 .TE - +. .PP A backslash followed by any other character indicates that character is to be taken literally. @@ -126,11 +128,12 @@ quits, the first character of the extra . .SH EXAMPLE The following input file describes the set of -default command keys used by +default command keys used by .BR less . Documentation on each command can be found in the -.less +.B less man page, under the key sequence which invokes the command. +.RE .sp .RS 5m .TS @@ -231,9 +234,9 @@ T prev-tag - toggle-option :t toggle-option t s toggle-option o - ## Use a long option name by starting the + ## Use a long option name by starting the ## extra string with ONE dash; eg: - ## s toggle-option -log-file\en + ## s toggle-option \-log-file\en \&_ display-option | pipe v visual @@ -368,7 +371,8 @@ it should be appended to the end of the the equals sign is ignored, as noted above.) . .SH CONDITIONAL CONFIGURATION -If a line begins with #version followed by a relational operator and a version number, +If a line begins with #version followed by a relational operator and a +version number, the remainder of the line is parsed if and only if the running version of .B less (or @@ -377,12 +381,14 @@ matches the operator. This can be helpful if a lesskey file is used by different versions of .BR less . .sp -For example, suppose that a new command named 'sideways-search' is added in +For example, suppose that a new command named 'sideways-search' is added in .B less version 777. -Then the following line would assign the command to the Q key, but only in versions of +Then the following line would assign the command to the Q key, +but only in versions of .B less -which support it. The line would be ignored by versions earlier than 777. +which support it. +The line would be ignored by versions earlier than 777. .sp .nf #version >= 777 Q sideways-search @@ -410,13 +416,13 @@ In those older versions, all #version li . .SH EXAMPLE The following input file sets the \-i and \-S options when -.less +.B less is run and, on version 595 and higher, adds a \-\-color option. .sp .nf #env ## (Note that there must be a space at the end of the next line, - ## to separate the --color option from the -S option.) + ## to separate the \-\-color option from the \-S option.) LESS = \-i\ \-S\ #version\ >=\ 595\ \ LESS\ +=\ \-\-color=Hkc .fi