Package: x11-xserver-utils Version: 7.7+11 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 -rCHECKSTYLE=10 -ww -z < "man page" [Use "groff -e ' $' -e '\\~$' <file>" to find obvious 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? troff:<stdin>:67: warning: trailing space in the line troff:<stdin>:68: warning: trailing space in the line troff:<stdin>:69: warning: trailing space in the line troff:<stdin>:70: warning: trailing space in the line troff:<stdin>:86: warning: trailing space in the line troff:<stdin>:95: warning: trailing space in the line troff:<stdin>:103: warning: trailing space in the line troff:<stdin>:151: warning: trailing space in the line troff:<stdin>:152: warning: trailing space in the line troff:<stdin>:173: warning: trailing space in the line troff:<stdin>:182: warning: trailing space in the line troff:<stdin>:202: warning: trailing space in the line troff:<stdin>:225: warning: trailing space in the line troff:<stdin>:230: warning: trailing space in the line troff:<stdin>:248: warning: trailing space in the line troff:<stdin>:282: warning: trailing space in the line troff:<stdin>:288: warning: trailing space in the line * 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.12.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 x11-xserver-utils depends on: ii cpp 4:14.2.0-1 ii libc6 2.40-5 ii libice6 2:1.1.1-1 ii libx11-6 2:1.8.10-2 ii libxaw7 2:1.0.16-1 ii libxcursor1 1:1.2.3-1 ii libxext6 2:1.3.4-1+b3 ii libxi6 2:1.8.2-1 ii libxmu6 2:1.1.3-3+b4 ii libxmuu1 2:1.1.3-3+b4 ii libxrandr2 2:1.5.4-1+b3 ii libxt6t64 1:1.2.1-1.2+b2 ii libxxf86vm1 1:1.1.4-1+b4 x11-xserver-utils recommends no packages. Versions of packages x11-xserver-utils suggests: pn cairo-5c <none> pn nickle <none> ii xorg-docs-core 1:1.7.1-1.2 -- no debconf information
Input file is xmodmap.1 Output from "mandoc -T lint xmodmap.1": (shortened list) 5 skipping paragraph macro: PP after SH 1 skipping paragraph macro: PP empty 22 whitespace at end of input line -.-. Output from "test-groff -mandoc -t -ww -z xmodmap.1": (shortened list) 17 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 17 -.-. 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. 55:.in -.5i 61:xmodmap - utility for modifying keymaps and pointer button mappings in X 64:[-options ...] [filename] 222:% xmodmap -e "pointer = 3 2 1" 236:% xmodmap -e "keysym Multi_key = Multi_key Meta_L" 242:% xmodmap -e "keysym Alt_L = Meta_L Alt_L" 251:% xmodmap -e "keysym BackSpace = Delete" 252:% echo "XTerm*ttyModes: erase ^?" | xrdb -merge -.-. 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 final abbreviation point as such by suffixing it with "\&". 114:standard output. This is the default mode of operation if no other mode -.-. Do not use more than two space characters between sentences or (better) only a new line character. 114:standard output. This is the default mode of operation if no other mode -.-. The name of a man page is typeset in bold and the section in roman (see man-pages(7)). 317:X(7), xev(1), setxkbmap(1), 318:XStringToKeysym(3), -.-. Add a zero (0) in front of a decimal fraction that begins with a period (.) 49:.if t .sp .5 57:.if t .sp .5 -.-. Split a punctuation from a single argument, if a two-font macro is meant. 83:.I xmodmap. 196:.B add, -.-. 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. xmodmap.1:146:\fI<X11/keysymdef.h>\fP (without the \fIXK_\fP prefix). xmodmap.1:191:expressions to swap keys (see the EXAMPLES section). xmodmap.1:288:sets the backspace key to generate Delete (as shown above), flushes all -.-. Output from "test-groff -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=10 -ww -z ": troff:<stdin>:67: warning: trailing space in the line troff:<stdin>:68: warning: trailing space in the line troff:<stdin>:69: warning: trailing space in the line troff:<stdin>:70: warning: trailing space in the line troff:<stdin>:86: warning: trailing space in the line troff:<stdin>:95: warning: trailing space in the line troff:<stdin>:103: warning: trailing space in the line troff:<stdin>:151: warning: trailing space in the line troff:<stdin>:152: warning: trailing space in the line troff:<stdin>:173: warning: trailing space in the line troff:<stdin>:182: warning: trailing space in the line troff:<stdin>:202: warning: trailing space in the line troff:<stdin>:225: warning: trailing space in the line troff:<stdin>:230: warning: trailing space in the line troff:<stdin>:248: warning: trailing space in the line troff:<stdin>:282: warning: trailing space in the line troff:<stdin>:288: warning: trailing space in the line
--- xmodmap.1 2025-01-27 02:29:11.964738131 +0000 +++ xmodmap.1.new 2025-01-27 02:53:13.027261750 +0000 @@ -20,16 +20,16 @@ .\" DEALINGS IN THE SOFTWARE. .\" .\" Copyright 1988, 1989, 1990, 1998 The Open Group -.\" +.\" .\" Permission to use, copy, modify, distribute, and sell this software and its .\" documentation for any purpose is hereby granted without fee, provided that .\" the above copyright notice appear in all copies and that both that .\" copyright notice and this permission notice appear in supporting .\" documentation. -.\" +.\" .\" The above copyright notice and this permission notice shall be included .\" in all copies or substantial portions of the Software. -.\" +.\" .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. @@ -37,40 +37,38 @@ .\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, .\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR .\" OTHER DEALINGS IN THE SOFTWARE. -.\" +.\" .\" Except as contained in this notice, the name of The Open Group shall .\" not be used in advertising or otherwise to promote the sale, use or .\" other dealings in this Software without prior written authorization .\" from The Open Group. -.\" +.\" .de EX \"Begin example .ne 5 .if n .sp 1 -.if t .sp .5 +.if t .sp 0.5 .nf -.in +.5i +.in +0.5i .. .de EE .fi -.in -.5i +.in -0.5i .if n .sp 1 -.if t .sp .5 +.if t .sp 0.5 .. .TH XMODMAP 1 "xmodmap 1.0.11" "X Version 11" .SH NAME -xmodmap - utility for modifying keymaps and pointer button mappings in X +xmodmap \- utility for modifying keymaps and pointer button mappings in X .SH SYNOPSIS .B xmodmap -[-options ...] [filename] +[\-options ...] [filename] .SH DESCRIPTION -.PP -The \fIxmodmap\fP program is used to edit and display the -keyboard \fImodifier map\fP and \fIkeymap table\fP that are used by client -applications to convert event keycodes into keysyms. It is usually run from -the user's session startup script to configure the keyboard according to +The \fIxmodmap\fP program is used to edit and display the +keyboard \fImodifier map\fP and \fIkeymap table\fP that are used by client +applications to convert event keycodes into keysyms. It is usually run from +the user's session startup script to configure the keyboard according to personal tastes. .SH OPTIONS -.PP The following options may be used with \fIxmodmap\fP: .TP 8 .B \-display \fIdisplay\fP @@ -80,10 +78,10 @@ This option specifies the host and displ This option indicates that a brief description of the command line arguments should be printed on the standard error channel. This will be done whenever an unhandled argument is given to -.I xmodmap. +.IR xmodmap . .TP 8 .B \-grammar -This option indicates that a help message describing the expression grammar +This option indicates that a help message describing the expression grammar used in files and with \-e expressions should be printed on the standard error. .TP 8 .B \-version @@ -92,7 +90,7 @@ This option indicates that should print its version information and exit. .TP 8 .B \-verbose -This option indicates that +This option indicates that .I xmodmap should print logging information as it parses its input. .TP 8 @@ -100,7 +98,7 @@ should print logging information as it p This option turns off the verbose logging. This is the default. .TP 8 .B \-n -This option indicates that +This option indicates that .I xmodmap should not change the mappings, but should display what it would do, like \fImake(1)\fP does when given this option. @@ -111,7 +109,8 @@ may be specified from the command line. .TP 8 .B \-pm This option indicates that the current modifier map should be printed on the -standard output. This is the default mode of operation if no other mode +standard output. +This is the default mode of operation if no other mode options are specified. .TP 8 .B \-pk @@ -134,7 +133,6 @@ The \fIfilename\fP specifies a file cont to be executed. This file is usually kept in the user's home directory with a name like \fI.xmodmaprc\fP. .SH EXPRESSION GRAMMAR -.PP The .I xmodmap program reads a list of expressions and parses them all before attempting @@ -143,13 +141,14 @@ being redefined in a natural way without conflicts. .PP The list of keysym names may be found in the header file -\fI<X11/keysymdef.h>\fP (without the \fIXK_\fP prefix). +\fI<X11/keysymdef.h>\fP +(without the \fIXK_\fP prefix). Keysyms matching Unicode characters may be specified as "U0020" to "U007E" and "U00A0" to "U10FFFF" for all possible Unicode characters. .TP 8 .B keycode \fINUMBER\fP = \fIKEYSYMNAME ...\fP -The list of keysyms is assigned to the indicated keycode -(which may be specified in decimal, hex or octal and can be determined by +The list of keysyms is assigned to the indicated keycode +(which may be specified in decimal, hex or octal and can be determined by running the .I xev program). Up to eight keysyms may be attached to a key, however the last four @@ -170,7 +169,7 @@ if the same keysym is bound to multiple for each matching keycode. .TP 8 .B clear \fIMODIFIERNAME\fP -This removes all entries in the modifier map for the given modifier, where +This removes all entries in the modifier map for the given modifier, where valid name are: .BR Shift , .BR Lock , @@ -179,7 +178,7 @@ valid name are: .BR Mod2 , .BR Mod3 , .BR Mod4 , -and \fBMod5\fP (case +and \fBMod5\fP (case does not matter in modifier names, although it does matter for all other names). For example, ``clear Lock'' will remove all any keys that were bound to the shift lock modifier. @@ -188,18 +187,19 @@ all any keys that were bound to the shif This adds all keys containing the given keysyms to the indicated modifier map. The keysym names are evaluated after all input expressions are read to make it easy to write -expressions to swap keys (see the EXAMPLES section). +expressions to swap keys +(see the EXAMPLES section). .TP 8 .B remove \fIMODIFIERNAME\fP = \fIKEYSYMNAME ...\fP This removes all keys containing the given keysyms from the indicated modifier map. Unlike -.B add, +.BR add , the keysym names are evaluated as the line is read in. This allows you to remove keys from a modifier without having to worry about whether or not they have been reassigned. .TP 8 .B "pointer = default" -This sets the pointer map back to its default settings (button 1 generates a +This sets the pointer map back to its default settings (button 1 generates a code of 1, button 2 generates a 2, etc.). .TP 8 .B pointer = \fINUMBER ...\fP @@ -212,44 +212,43 @@ Lines that begin with an exclamation poi If you want to change the binding of a modifier key, you must also remove it from the appropriate modifier map. .SH EXAMPLES -.PP Many pointers are designed such that the first button is pressed using the index finger of the right hand. People who are left-handed frequently find that it is more comfortable to reverse the button codes that get generated so that the primary button is pressed using the index finger of the left hand. This could be done on a 3 button pointer as follows: .EX -% xmodmap -e "pointer = 3 2 1" +% xmodmap \-e "pointer = 3 2 1" .EE .PP -Many applications support the notion of Meta keys (similar to Control +Many applications support the notion of Meta keys (similar to Control keys except that Meta is held down instead of Control). However, some servers do not have a Meta keysym in the default keymap table, so one needs to be added by hand. The following command will attach Meta to the Multi-language key (sometimes -labeled Compose Character). It also takes advantage of the fact that +labeled Compose Character). It also takes advantage of the fact that applications that need a Meta key simply need to get the keycode and don't require the keysym to be in the first column of the keymap table. This means that applications that are looking for a Multi_key (including the default modifier map) won't notice any change. .EX -% xmodmap -e "keysym Multi_key = Multi_key Meta_L" +% xmodmap \-e "keysym Multi_key = Multi_key Meta_L" .EE .PP Similarly, some keyboards have an Alt key but no Meta key. In that case the following may be useful: .EX -% xmodmap -e "keysym Alt_L = Meta_L Alt_L" +% xmodmap \-e "keysym Alt_L = Meta_L Alt_L" .EE .PP One of the more simple, yet convenient, uses of \fIxmodmap\fP is to set the keyboard's "rubout" key to generate an alternate keysym. This frequently involves exchanging Backspace with Delete to be more comfortable to the user. -If the \fIttyModes\fP resource in \fIxterm\fP is set as well, all terminal +If the \fIttyModes\fP resource in \fIxterm\fP is set as well, all terminal emulator windows will use the same key for erasing characters: .EX -% xmodmap -e "keysym BackSpace = Delete" -% echo "XTerm*ttyModes: erase ^?" | xrdb -merge +% xmodmap \-e "keysym BackSpace = Delete" +% echo "XTerm*ttyModes: erase ^?" | xrdb \-merge .EE .PP Some keyboards do not automatically generate less than and greater than @@ -279,13 +278,15 @@ add Lock = Caps_Lock add Control = Control_L .EE .PP -This example can be run again to swap the keys back to their previous +This example can be run again to swap the keys back to their previous assignments. .PP The \fIkeycode\fP command is useful for assigning the same keysym to multiple keycodes. Although unportable, it also makes it possible to write scripts that can reset the keyboard to a known state. The following script -sets the backspace key to generate Delete (as shown above), flushes all +sets the backspace key to generate Delete +(as shown above), +flushes all existing caps lock bindings, makes the CapsLock key be a control key, make F5 generate Escape, and makes Break/Reset be a shift lock. @@ -309,16 +310,13 @@ keycode 15 = Caps_Lock add Lock = Caps_Lock .EE .SH ENVIRONMENT -.PP .TP 8 .B DISPLAY to get default host and display number. .SH SEE ALSO -X(7), xev(1), setxkbmap(1), -XStringToKeysym(3), +.BR X "(7), " xev "(1), " setxkbmap "(1), " XStringToKeysym (3), \fIXlib\fP documentation on key and pointer events .SH BUGS -.PP Every time a \fBkeycode\fP expression is evaluated, the server generates a \fIMappingNotify\fP event on every client. This can cause some thrashing. All of the changes should be batched together and done at once.
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 -.- 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. Not beginning each input sentence on a new line. Line length 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 -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 -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) -.-