public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
From: Alejandro Colomar <alx@kernel.org>
To: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Cc: Muhammad Usama Anjum <usama.anjum@collabora.com>,
	kernel@collabora.com, linux-man@vger.kernel.org
Subject: Re: [PATCH 2/2] ioctl_pagemap_scan: add page for pagemap_scan IOCTL
Date: Tue, 24 Oct 2023 12:40:55 +0200	[thread overview]
Message-ID: <ZTefONm-aap2x1nF@debian> (raw)
In-Reply-To: <20231024024802.e6hfjvfumzc2rbil@illithid>

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

Hi Branden,

On Mon, Oct 23, 2023 at 09:48:02PM -0500, G. Branden Robinson wrote:
> Hi Alex,
> 
> At 2023-10-23T23:52:28+0200, Alejandro Colomar wrote:
> > [CC += Branden]
> > > +.SH SYNOPSIS
> > > +.nf
> > > +.BR "#include <linux/fs.h>" "  /* Definition of " struct " " pm_scan_arg ", "
> > > +.BR "                          struct page_region "and " PAGE_IS_* "constants " */"
> > 
> > That space is not necessary after a closing '"' is something I don't
> > know why exists.
> 
> Right; since filling is off, and the line will be broken after
> "pm_scan_arg," (with typeface changes) anyway, this attempts to put a
> space at the end of the line.  But that would be invisible, and an
> according-to-Hoyle *roff formatter would get rid of such spaces at the
> end of the line before sending them to the output device anyway.
> 
> $ printf '.TH foo 1 date package\n.B "pm_scan_arg, "\n' \
>   | groff -Tutf8 -man -Z | sed -n '/pm_scan_arg/,/package/p'
> tpm_scan_arg,
> n40 0
> f1
> V200
> H0
> tpackage
> 
> If one has learned device-independent troff's output language (see
> groff_out(5)), one can see that the space after the comma is simply
> discarded.

Hmm, I might use .grout for the similarity with that manual page name.  ;)

[...]

> 
> > > +.TP
> > > +.B vec
> > > +The address of
> > > +.I page_region
> > > +array for output.
> > > +.PP
> > > +.in +8n
> > 
> > Ahh, this is great, because I needed to explain to groff(1)
> > maintainers what is the problem with TP that I was complaining about
> > in another thread.
> > 
> > Branden, here's what I mean.
> 
> Good, yes.  I see what you're talking about.  We can now use
> ioctl_pagemap_scan(2) as a site for our horrific medical experiments.
> 3:-)
> 
> I think this is an instance of the tricky little constraint problem
> Michael Kerrisk and I discussed almost 3 years ago.
> 
> https://lore.kernel.org/linux-man/a79fc055-c7ab-1793-04eb-eb4f678e5035@gmail.com/

Yep, and like Michael, I also dislike the line break.  Is there any
chance that we could make it not break after TP so that it (RS) would be
usable there?

> 
> In all that time, no flash of brilliance has yet illuminated a solution
> (that wouldn't involve extending the man(7) language, like recognizing
> an additional argument to TP or other paragraphing macros).
> 
> > If you're new to man(7), it is rather unintuitive what to do here.
> 
> Yes.  groff_man_style(7) attempts to offer advice here, in subsections
> "Horizontal and vertical spacing" and as one of the FAQs in "Notes"
> (".RS doesn't indent relative to my indented paragraph.").

Yup, but anyone new to man(7) will likely be put off by that page.

$ man groff_man_style | wc -l
1439

If you're just contributing a few paragraphs, you may prefer to learn by
trial and error (which is a perfectly valid approach, and one that I
prefer).  Only when I wanted to learn the more obscure details, or quote
to someone else, I've read that page (and I haven't read it entirely
yet!).

Cheers,
Alex

> 
> That's more material than I care to quote to this list, so I will just
> advise anyone who doesn't already have groff 1.23.0 installed to check
> out pages 261 and 269 of
> <https://www.gnu.org/software/groff/manual/groff-man-pages.pdf>.
> 
> > Muhammad, in this project, we usually use IP to continuate a TP.
> 
> More projects than this one use it for that purpose; when `IP` itself is
> given no tag argument, it is idiomatic usage going back to 1979.
> 
> Regards,
> Branden



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

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

  reply	other threads:[~2023-10-24 10:41 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-19 13:12 [PATCH 1/2] ioctl_userfaultfd.2: add UFFD_FEATURE_WP_ASYNC Muhammad Usama Anjum
2023-10-19 13:12 ` [PATCH 2/2] ioctl_pagemap_scan: add page for pagemap_scan IOCTL Muhammad Usama Anjum
2023-10-23 21:52   ` Alejandro Colomar
2023-10-24  2:48     ` G. Branden Robinson
2023-10-24 10:40       ` Alejandro Colomar [this message]
2023-10-28 13:07         ` managing tagged paragraphs (was: [PATCH 2/2] ioctl_pagemap_scan: add page for pagemap_scan IOCTL) G. Branden Robinson
2023-10-28 16:22           ` Alejandro Colomar
2023-10-28 18:07             ` G. Branden Robinson
2023-10-29  0:42               ` Alejandro Colomar
2023-10-24 15:51     ` [PATCH 2/2] ioctl_pagemap_scan: add page for pagemap_scan IOCTL Muhammad Usama Anjum
2023-10-19 13:27 ` [PATCH 1/2] ioctl_userfaultfd.2: add UFFD_FEATURE_WP_ASYNC Alejandro Colomar
2023-10-19 13:29 ` Alejandro Colomar
2023-10-19 13:34   ` Muhammad Usama Anjum
2023-10-19 13:42     ` Alejandro Colomar
  -- strict thread matches above, loose matches on Subject: below --
2023-10-17 15:01 Muhammad Usama Anjum
2023-10-17 15:01 ` [PATCH 2/2] ioctl_pagemap_scan: add page for pagemap_scan IOCTL Muhammad Usama Anjum
2023-10-17 17:12   ` Alejandro Colomar
2023-10-19 12:31     ` Muhammad Usama Anjum
2023-10-19 12:51       ` Alejandro Colomar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZTefONm-aap2x1nF@debian \
    --to=alx@kernel.org \
    --cc=g.branden.robinson@gmail.com \
    --cc=kernel@collabora.com \
    --cc=linux-man@vger.kernel.org \
    --cc=usama.anjum@collabora.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox