[PATCH 04/31] docs: replace `sp` requests with `P` or `IP` calls
"G. Branden Robinson" <[email protected]> Thu, 23 Apr 2026 17:57:37 -0500
| Newsgroups | gmane.editors.nano.devel |
|---|---|
| Message-ID | <20260423225737.7g3apjkv6jvu52cm@illithid> |
...in man pages.
Use of the *roff request in man(7) documents can lead to inconsistent
vertical separation between paragraphs.
groff_man(7):
Horizontal and vertical spacing
...
Several macros insert vertical space: SH, SS, TP, P (and its
synonyms), IP, and HP. They then enable no‐space mode; see
groff(7). The default inter‐section and inter‐paragraph spacing is
1v for terminals and 0.4v for typesetters. (The deprecated macro
PD can change this vertical spacing, but we discourage its use.)
Between EX and EE calls, the inter‐paragraph spacing is 1v
regardless of output device.
groff_man_style(7):
Portability
...
In roff systems, elemental functions called requests and escape
sequences control formatting operations. A request appears on a
control line. An escape sequence starts with a backslash (\) and
can appear almost anywhere. However, use of roff requests (apart
from the empty request “.”) risks poor rendering when a page is
processed by non‐roff formatters that attempt to interpret page
sources. (Historically, this was commonly attempted for HTML
conversion.) Many of these programs don’t interpret the full roff
language (let alone extensions): they may be incapable of handling
numeric expressions, control structures, or register, string, and
macro definitions, causing a document’s contents to be omitted or
presented incomprehensibly. If your document uses formatter
requests, or escape sequences not shown below, it accepts
responsibility for restoring formatter state to what the man macro
package expects.
---
doc/nano.1 | 48 ++++++++++++++++++++++++------------------------
doc/nanorc.5 | 40 ++++++++++++++++++++--------------------
doc/rnano.1 | 4 ++--
3 files changed, 46 insertions(+), 46 deletions(-)
diff --git a/doc/nano.1 b/doc/nano.1
index 7ebb07fc..2e61bc5d 100644
--- a/doc/nano.1
+++ b/doc/nano.1
@@ -24,7 +24,7 @@ .SH NAME
.SH SYNOPSIS
.B nano
.RI [ options "] [[\fB+" line [\fB, column "]] " file ]...
-.sp
+.P
.BR nano " [" \fIoptions "] [[" + [ crCR ]{ / | ? } \fIstring "] " \fIfile ]...
.
.SH NOTICES
@@ -33,24 +33,24 @@ .SH NOTICES
instead of scrolling only the current line by a large step.
If you prefer the old behavior, you can use \fB--solo\fR on the
command line or \fBset solosidescroll\fR in your \fInanorc\fR.
-.sp
+.P
Also since version 9.0, keystrokes \fBM-<\fR and \fBM->\fR have
been reassigned to the `scrollleft` and `scrollright` functions.
If you want those keystrokes to do what they did before version 9.0,
add these two lines at the end of your \fInanorc\fR file:
-.sp
+.P
.RS 4
.B bind M\-< prevbuf main
.br
.B bind M\-> nextbuf main
.RE
-.sp
+.P
Since version 8.0, to be newcomer friendly, \fB^F\fR starts a forward search,
\fB^B\fR starts a backward search, \fBM\-F\fR searches the next occurrence
forward, and \fBM\-B\fR searches the next occurrence backward. If you want
those keystrokes to do what they did before version 8.0, add the following
four lines at the end of your \fInanorc\fR file:
-.sp
+.P
.RS 4
.B bind ^F forward main
.br
@@ -60,19 +60,19 @@ .SH NOTICES
.br
.B bind M\-B linter main
.RE
-.sp
+.P
.
.SH DESCRIPTION
\fBnano\fR is a small and friendly text editor. It copies the look and feel
of Pico, but is free software, and implements several features that Pico
lacks, such as: opening multiple files, scrolling per line, undo/redo,
syntax coloring, line numbering, and soft-wrapping overlong lines.
-.sp
+.P
When giving a filename on the command line, the cursor can be put on a
specific line by adding the line number with a plus sign (\fB+\fR) before
the filename, and even in a specific column by adding it with a comma.
Negative numbers count from the end of the file or line.
-.sp
+.P
The cursor can be put on the first or last occurrence of a specific string
by specifying that string after \fB+/\fR or \fB+?\fR before the filename.
The string can be made case sensitive and/or caused to be interpreted as a
@@ -81,11 +81,11 @@ .SH DESCRIPTION
of those letters: \fBC\fR and/or \fBR\fR. When the string contains spaces,
it needs to be enclosed in quotes. To give an example: to open a file at
the first occurrence of the word "Foo", you would do:
-.sp
+.P
.RS 4
.BI "nano +c/Foo " file
.RE
-.sp
+.P
As a special case: if instead of a filename a dash (\fB\-\fR) is given,
\fBnano\fR will read data from standard input.
.
@@ -98,24 +98,24 @@ .SH EDITING
Any cursor movement or executing any other command causes the next
\fB^K\fR to overwrite the cutbuffer. A \fB^U\fR pastes the current
contents of the cutbuffer at the current cursor position.
-.sp
+.P
When a more precise piece of text needs to be cut or copied, you can mark
its start with \fB^6\fR, move the cursor to its end (the marked text is
highlighted), and then use \fB^K\fR to cut it, or \fBM\-6\fR to copy it to
the cutbuffer. You can also save the marked text to a file with \fB^O\fR,
or spell check it with \fB^T^T\fR.
-.sp
+.P
On some terminals, text can be selected also by holding down Shift while
using the arrow keys. Holding down the Ctrl or Alt key too increases
the stride.
Any cursor movement without Shift being held cancels such a selection.
-.sp
+.P
Any valid Unicode code point can be inserted into the buffer by typing
\fBM\-V\fR followed by the hexadecimal digits of the code point (concluded
with \fB<Space>\fR or \fB<Enter>\fR when it are fewer than six digits).
A literal control code (except \fB^J\fR) can be inserted by typing
\fBM\-V\fR followed by the pertinent keystroke.
-.sp
+.P
The two lines at the bottom of the screen show some important commands;
the built-in help (\fB^G\fR) lists all the available ones.
The default key bindings can be changed via a \fInanorc\fR file \(em see
@@ -445,7 +445,7 @@ .SH TOGGLES
\fBM\-N\fR toggles line numbers, \fBM\-M\fR toggles the mouse,
\fBM\-I\fR auto-indentation, and \fBM\-X\fR the help lines.
See at the end of the \fB^G\fR help text for a complete list.
-.sp
+.P
The \fBM\-X\fR toggle is special: it works in all menus except
the help viewer and the linter. All other toggles work in
the main menu only.
@@ -459,7 +459,7 @@ .SH FILES
or \fI~/.config/nano/nanorc\fR, whichever is encountered first. See
.BR nanorc (5)
for more information on the possible contents of those files.
-.sp
+.P
See \fI/usr/share/nano/\fR and \fI/usr/share/nano/extra/\fR
for available syntax-coloring definitions.
.
@@ -478,19 +478,19 @@ .SH NOTES
Suspension is enabled by default, reachable via \fB^T^Z\fR.
(If you want a plain \fB^Z\fR to suspend nano, add
\fBbind ^Z suspend main\fR to your nanorc.)
-.sp
+.P
At a Yes-No prompt, \fB^Y\fR can be used for "Yes", \fB^N\fR for "No",
and \fB^A\fR for "All".
(And when exiting, \fB^Q\fR can be used for "Quit with error".)
These unlisted bindings work in any locale.
-.sp
+.P
When you want to copy marked text from \fBnano\fR to the system's clipboard,
see one of the examples in the \fBnanorc\fR(5) man page.
-.sp
+.P
If no alternative spell checker command is specified on the command
line nor in one of the \fInanorc\fR files, \fBnano\fR checks the
\fBSPELL\fR environment variable for one.
-.sp
+.P
In some cases \fBnano\fR tries to dump the buffer into an emergency file.
This happens mainly if \fBnano\fR receives a SIGHUP or SIGTERM or runs out
of memory. It writes the buffer into a file named \fInano.save\fR if the
@@ -499,7 +499,7 @@ .SH NOTES
current directory, it adds ".save" plus a number (e.g.\& ".save.1") to
the current filename in order to make it unique. In multibuffer mode,
\fBnano\fR writes all open buffers to their respective emergency files.
-.sp
+.P
If you have any question about how to use \fBnano\fR in some specific
situation, you can ask on \fIhelp\[email protected]\fR.
.
@@ -507,11 +507,11 @@ .SH BUGS
The recording and playback of keyboard macros works correctly only on a
terminal emulator, not on a Linux console (VT), because the latter does
not by default distinguish modified from unmodified arrow keys.
-.sp
+.P
Please report any other bugs that you encounter via:
.br
.IR https://savannah.gnu.org/bugs/?group=nano .
-.sp
+.P
When nano crashes, it saves any modified buffers to emergency .save files.
If you are able to reproduce the crash and you want to get a backtrace, define
the environment variable \fBNANO_NOCATCH\fR.
@@ -521,5 +521,5 @@ .SH HOMEPAGE
.
.SH SEE ALSO
.BR nanorc (5)
-.sp
+.P
\fI/usr/share/doc/nano/\fR (or equivalent on your system)
diff --git a/doc/nanorc.5 b/doc/nanorc.5
index 66511125..9288d4b7 100644
--- a/doc/nanorc.5
+++ b/doc/nanorc.5
@@ -37,24 +37,24 @@ .SH NOTICES
instead of scrolling only the current line by a large step.
If you prefer the old behavior, you can use \fB--solo\fR on the
command line or \fBset solosidescroll\fR in your \fInanorc\fR.
-.sp
+.P
Also since version 9.0, keystrokes \fBM-<\fR and \fBM->\fR have
been reassigned to the `scrollleft` and `scrollright` functions.
If you want those keystrokes to do what they did before version 9.0,
add these two lines at the end of your \fInanorc\fR file:
-.sp
+.P
.RS 4
.B bind M\-< prevbuf main
.br
.B bind M\-> nextbuf main
.RE
-.sp
+.P
Since version 8.0, to be newcomer friendly, \fB^F\fR starts a forward search,
\fB^B\fR starts a backward search, \fBM\-F\fR searches the next occurrence
forward, and \fBM\-B\fR searches the next occurrence backward. If you want
those keystrokes to do what they did before version 8.0, add the following
four lines at the end of your \fInanorc\fR file:
-.sp
+.P
.RS 4
.B bind ^F forward main
.br
@@ -64,7 +64,7 @@ .SH NOTICES
.br
.B bind M\-B linter main
.RE
-.sp
+.P
.
.\" Never hyphenate these:
.hw ncurses terminfo
@@ -76,17 +76,17 @@ .SH OPTIONS
syntax highlighting and to rebind keys \(em see the two separate sections
on those. \fBnano\fR reads one command per line.
All commands and keywords should be written in lowercase.
-.sp
+.P
Options in \fInanorc\fR files take precedence over nano's defaults, and
command-line options override \fInanorc\fR settings. Also, options that
do not take an argument are unset by default. So using the \fBunset\fR
command is only needed when wanting to override a setting of the system's
\fInanorc\fR file in your own \fInanorc\fR. Options that take an
argument cannot be unset.
-.sp
+.P
Quotes inside the \fIcharacters\fR parameters below should not be escaped.
The last double quote on the line will be seen as the closing quote.
-.sp
+.P
The supported commands and arguments are:
.TP 3
.B set afterends
@@ -462,7 +462,7 @@ .SH SYNTAX HIGHLIGHTING
powerful enough to fully parse a file. Nevertheless, regular
expressions can do a lot and are easy to make, so they are a
good fit for a small editor like \fBnano\fR.
-.sp
+.P
All regular expressions in \fBnano\fR are POSIX extended regular expressions.
This means that \fB.\fR, \fB?\fR, \fB*\fR, \fB+\fR, \fB^\fR, \fB$\fR, and
several other characters are special.
@@ -476,7 +476,7 @@ .SH SYNTAX HIGHLIGHTING
It also means that lookahead and lookbehind are not possible.
A complete explanation can be found in the manual page of GNU grep:
\fBman grep\fR.
-.sp
+.P
Each regular expression in a \fBnanorc\fR file should be wrapped in
double quotes (\fB""\fR). Multiple regular expressions can follow
each other on a line by separating them with blanks. This means that
@@ -484,7 +484,7 @@ .SH SYNTAX HIGHLIGHTING
When you need this combination inside a regular expression,
then either the double quote or the blank should be put
between square brackets (\fB[]\fR).
-.sp
+.P
For each kind of file a separate syntax can be defined
via the following commands:
.TP
@@ -493,14 +493,14 @@ .SH SYNTAX HIGHLIGHTING
All subsequent \fBcolor\fR and other such commands
are added to this syntax, until a new \fBsyntax\fR
command is encountered.
-.sp
+.IP
When \fBnano\fR is run, this syntax is automatically
activated (for the relevant buffer) if the absolute filename
matches the extended regular expression \fIfileregex\fR.
Or the syntax can be explicitly activated (for all buffers)
by using the \fB\-Y\fR or \fB\-\-syntax\fR
command-line option followed by the \fIname\fR.
-.sp
+.IP
The syntax \fBdefault\fR is special: it takes no \fIfileregex\fR,
and applies to files that don't match any syntax's regexes.
The syntax \fBnone\fR is reserved; specifying it on the command line
@@ -569,7 +569,7 @@ .SH SYNTAX HIGHLIGHTING
The color pair may be preceded by \fBbold\fR and/or \fB\%italic\fR
(separated by commas) to get a bold and/or slanting typeface,
if your terminal can do those.
-.sp
+.IP
All coloring commands are applied in the order in which they are specified,
which means that later commands can recolor stuff that was colored earlier.
.TP
@@ -621,7 +621,7 @@ .SH REBINDING KEYS
Unbinds the given \fIkey\fR from the given \fImenu\fR (or from all
menus where the key exists when \fBall\fR is used).
.RE
-.sp
+.P
Note that \fBbind \fIkey\fR \fB"{\fIfunction\fB}"\fR \fImenu\fR is equivalent
to \fBbind \fIkey\fR \fIfunction\fR \fImenu\fR, except that for the latter form
\fBnano\fR checks the availability of the \fIfunction\fR in the given \fImenu\fR
@@ -659,7 +659,7 @@ .SH REBINDING KEYS
.TP
.BR Ins " or " Del .
.RE
-.sp
+.P
Rebinding \fB^M\fR (Enter) or \fB^I\fR (Tab) is probably not a good idea.
Rebinding \fB^[\fR (Esc) is not possible, because its keycode
is the starter byte of Meta keystrokes and escape sequences.
@@ -1116,17 +1116,17 @@ .SH REBINDING KEYS
.
.SH EXAMPLES
To make \fBCtrl+Z\fR suspend nano:
-.sp
+.P
.RS
.B bind ^Z suspend main
.RE
-.sp
+.P
To make \fBShift+Alt+C\fR copy the marked region to the system's clipboard:
-.sp
+.P
.RS
.B bind Sh\-M\-C """{execute}| xsel \-ib {enter}{undo}""" main
.RE
-.sp
+.P
.
.SH FILES
.TP
diff --git a/doc/rnano.1 b/doc/rnano.1
index 24dd90f1..c5b5e455 100644
--- a/doc/rnano.1
+++ b/doc/rnano.1
@@ -24,14 +24,14 @@ .SH NAME
.SH SYNOPSIS
.B rnano
.RI [ options "] [[\fB+" line [\fB, column "]] " file ]...
-.sp
+.P
.BR rnano " [" \fIoptions "] [[" + [ crCR ]{ / | ? } \fIstring "] " \fIfile ]...
.
.SH DESCRIPTION
\fBrnano\fR runs the \fBnano\fR editor in restricted mode. This allows
editing only the specified file or files, and doesn't allow the user
access to the filesystem nor to a command shell.
-.sp
+.P
In restricted mode, \fBnano\fR will:
.IP \[bu] 2
not make backups;
--
2.30.2
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEh3PWHWjjDgcrENwa0Z6cfXEmbc4FAmnqo+EACgkQ0Z6cfXEm bc7/sw//VgB2et5U8Jb6Sp1m4LGv1Wxxo4S7WvmYOxz608EtMYrCkHb2T/ZSf+Rk ynuFvkBwf0dP2rSN3kE2rx/0Cy6uAmyifQti73I+xd20fnthoK+rwV5Uq8PAQpyz tlxwZuQa3xCu6krTP3uQKQHFyEgVkbamdykvB0KwAczTWwbPPcMd/kIhtef0zds7 HsyjRIJb4u2peQXVvagnre7OgucQR/6XCOcTUJjl1JuIUY1f50xBkxqJs75I409M dAcr+TQrhUlk1hzYRfsp2jY+vhjQzW5A1uNFdgu3mllCkR8AEm94lgtU1T0NfBiI /EyqCbS6/CASDv+LASEn/Tzl/tOfIETmzeJaF+ZnqdaeSGdomL63QYe98oQFUkUh UCibhfGTm2lWPtUieQ75dRk3GMPEmJxmrYNJIZEtb0XyWNazhIELr5vzXAsDLBmL D02a1fJKdg0iYSUT45UEfwqI8Af/PbBdwHQiK6ul76yJXzEvNPyFIjz6C+S7F6Uq tzFdHHpPHmWQ/LlcXcCklstbUZ/iuDP4AbBNIDyLzXlQ8PImLkFBAyUrPegr5jMj ItRDa32w7mtmoA84QCkgawp9VIhW/dYyQQ0q1VhGai8NYwlwt9aHUoElth1M+A8R ew04McPPyOByyLOgALS6wNozAn11m6V990ZzWv8cAsJOcwGMGVs= =W9uu -----END PGP SIGNATURE-----