linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Paragraphs formatted differently depending on previous ones
@ 2025-05-02 10:56 Alejandro Colomar
  2025-05-02 12:01 ` G. Branden Robinson
  0 siblings, 1 reply; 23+ messages in thread
From: Alejandro Colomar @ 2025-05-02 10:56 UTC (permalink / raw)
  To: branden, groff; +Cc: linux-man

[-- Attachment #1: Type: text/plain, Size: 6236 bytes --]

Hi Branden,

I'd like to understand why groff(1) formats differently a paragraph
depending on the previous ones.  I sometimes experience different
placement of spaces for an unchanged paragraph.  I use a script to diff
manual pages at different commits, which is useful to quickly see the
effects of a commit in a formatted page.  That script sometimes shows
suprious space changes (produced by groff(1)) for parts of the page that
haven't been changed, and which one would expect should not be formatted
differently.

Below is an example in what is now the latest commit in the Linux
man-pages repository.  The commit I'll be using for this example is
man-pages.git 5889aa978ddc (2025-05-02; "man/man2const/TIOCLINUX.2const:
Document CAP_SYS_ADMIN requirement for TIOCL_SETSEL modes").

	$ git log -1 -p --oneline 5889aa978ddc
	5889aa978 (HEAD -> master, korg/master, korg/HEAD, alx/main, alx/contrib, alx/HEAD, main, contrib) man/man2const/TIOCLINUX.2const: Document CAP_SYS_ADMIN requirement for TIOCL_SET>
	diff --git a/man/man2const/TIOCLINUX.2const b/man/man2const/TIOCLINUX.2const
	index 61f1c596d..b98a0202b 100644
	--- a/man/man2const/TIOCLINUX.2const
	+++ b/man/man2const/TIOCLINUX.2const
	@@ -72,18 +72,30 @@ .SH DESCRIPTION
	 Select character-by-character.
	 The indicated screen characters are highlighted
	 and saved in a kernel buffer.
	+.IP
	+Since Linux 6.7, using this selection mode requires the
	+.B CAP_SYS_ADMIN
	+capability.
	 .TP
	 .B TIOCL_SELWORD
	 Select word-by-word,
	 expanding the selection outwards to align with word boundaries.
	 The indicated screen characters are highlighted
	 and saved in a kernel buffer.
	+.IP
	+Since Linux 6.7, using this selection mode requires the
	+.B CAP_SYS_ADMIN
	+capability.
	 .TP
	 .B TIOCL_SELLINE
	 Select line-by-line,
	 expanding the selection outwards to select full lines.
	 The indicated screen characters are highlighted
	 and saved in a kernel buffer.
	+.IP
	+Since Linux 6.7, using this selection mode requires the
	+.B CAP_SYS_ADMIN
	+capability.
	 .TP
	 .B TIOCL_SELPOINTER
	 Show the pointer at position
	@@ -118,11 +130,11 @@ .SH DESCRIPTION
	 this operation yields an
	 .B EINVAL
	 error.
	-.RE
	 .IP
	-Since Linux 6.7, using this subcode requires the
	+Since Linux 6.7, using this selection mode requires the
	 .B CAP_SYS_ADMIN
	 capability.
	+.RE
	 .TP
	 .BR subcode = TIOCL_PASTESEL
	 Paste selection.

Now, let's use the diffman-git(1) script.  You can get it by installing
it from source from the man-pages repo: `make && sudo make install`.
You can also run it directly from the repo: `./src/bin/diffman-git`.
Documentation is in the repo as a manual page in man1, of course.

$ diffman-git 5889aa978ddc
--- 5889aa978ddc^:man/man2const/TIOCLINUX.2const
+++ 5889aa978ddc:man/man2const/TIOCLINUX.2const
@@ -38,36 +38,46 @@
                    Select character‐by‐character.  The indicated screen characters  are
                    highlighted and saved in a kernel buffer.
 
+                   Since  Linux 6.7, using this selection mode requires the CAP_SYS_AD‐
+                   MIN capability.
+
             TIOCL_SELWORD
-                   Select  word‐by‐word, expanding the selection outwards to align with
-                   word boundaries.  The indicated screen  characters  are  highlighted
+                   Select word‐by‐word, expanding the selection outwards to align  with
+                   word  boundaries.   The  indicated screen characters are highlighted
                    and saved in a kernel buffer.
 
+                   Since Linux 6.7, using this selection mode requires the  CAP_SYS_AD‐
+                   MIN capability.
+
             TIOCL_SELLINE
                    Select line‐by‐line, expanding the selection outwards to select full
                    lines.  The indicated screen characters are highlighted and saved in
                    a kernel buffer.
 
+                   Since  Linux 6.7, using this selection mode requires the CAP_SYS_AD‐
+                   MIN capability.
+
             TIOCL_SELPOINTER
-                   Show  the  pointer  at  position  (xs, ys) or (xe, ye), whichever is
+                   Show the pointer at position (xs, ys)  or  (xe,  ye),  whichever  is
                    later in text flow order.
 
             TIOCL_SELCLEAR
-                   Remove the current selection highlight, if  any,  from  the  console
+                   Remove  the  current  selection  highlight, if any, from the console
                    holding the selection.
 
                    This does not affect the stored selected text.
 
             TIOCL_SELMOUSEREPORT
-                   Make  the terminal report (xs, ys) as the current mouse location us‐
-                   ing the xterm(1) mouse  tracking  protocol  (see  console_codes(4)).
-                   The  lower 4 bits of sel_mode (TIOCL_SELBUTTONMASK) indicate the de‐
+                   Make the terminal report (xs, ys) as the current mouse location  us‐
+                   ing  the  xterm(1)  mouse  tracking protocol (see console_codes(4)).
+                   The lower 4 bits of sel_mode (TIOCL_SELBUTTONMASK) indicate the  de‐
                    sired button press and modifier key information for the mouse event.
 
-                   If mouse reporting is not enabled for the terminal,  this  operation
+                   If  mouse  reporting is not enabled for the terminal, this operation
                    yields an EINVAL error.
 
-            Since Linux 6.7, using this subcode requires the CAP_SYS_ADMIN capability.
+                   Since Linux 6.7, using this selection mode requires the  CAP_SYS_AD‐
+                   MIN capability.
 
      subcode=TIOCL_PASTESEL
             Paste selection.  The characters in the selection buffer are written to fd.


There are several paragraphs which shouldn't report changes: every
paragraph that doesn't start with "Since Linux 6.7," should be
unchanged.

Is this a bug?  Is it a feature?


Have a lovely day!
Alex

-- 
<https://www.alejandro-colomar.es/>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2025-06-02  7:26 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-02 10:56 Paragraphs formatted differently depending on previous ones Alejandro Colomar
2025-05-02 12:01 ` G. Branden Robinson
2025-05-02 12:26   ` grof --run Alejandro Colomar
2025-05-02 14:19     ` G. Branden Robinson
2025-05-02 14:59       ` Alejandro Colomar
2025-05-03  0:49         ` G. Branden Robinson
2025-05-03  7:25           ` Alejandro Colomar
2025-05-05 10:50           ` Colin Watson
2025-05-05 15:41             ` Ingo Schwarze
2025-05-07 18:10               ` G. Branden Robinson
2025-05-02 12:42   ` Paragraphs formatted differently depending on previous ones Alejandro Colomar
2025-05-02 14:29     ` G. Branden Robinson
2025-05-02 15:30       ` Alejandro Colomar
2025-05-02 13:06   ` Martin Lemaire
2025-05-02 14:51     ` G. Branden Robinson
2025-05-02 15:34       ` Alejandro Colomar
2025-05-03  1:30         ` G. Branden Robinson
2025-05-02 17:42     ` Dave Kemper
2025-05-02 18:46       ` Martin Lemaire
2025-05-03  0:14         ` G. Branden Robinson
2025-05-05 16:00           ` Joey Hess
2025-06-02  6:49             ` on "bricktext" (was: Paragraphs formatted differently depending on previous ones) G. Branden Robinson
2025-06-02  7:16               ` on "bricktext" James Cloos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).