public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
From: Alejandro Colomar <alx@kernel.org>
To: Seth McDonald <sethmcmail@pm.me>
Cc: linux-man@vger.kernel.org,
	"Douglas McIlroy" <douglas.mcilroy@dartmouth.edu>,
	"G. Branden Robinson" <branden@debian.org>,
	наб <nabijaczleweli@nabijaczleweli.xyz>
Subject: Re: [PATCH v2] src/bin/mansectf, man/man1/mansectf.1: Add program and manual page
Date: Thu, 29 Jan 2026 12:27:51 +0100	[thread overview]
Message-ID: <aXtB34FpfoybBAkN@devuan> (raw)
In-Reply-To: <aXr1G4Y2VZZO0t3N@McDaDebianPC>

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

Hi Seth,

On 2026-01-29T05:50:26+0000, Seth McDonald wrote:
> Hi Alex,
> 
> On Wed, 28 Jan 2026 at 19:55:43 +0100, Alejandro Colomar wrote:
> [...]
> > +.SH PARAMETERS
> > +See
> > +.BR mansect (1).
> 
> (If this isn't a problem then feel free to skip this)
> 
> AFAICT, 'PARAMETERS' isn't a heading used anywhere else.  Running
> 
> 	~/Code/Linux/man-pages$ grep -Fnr 'PARAMETERS' man/
> 
> comes up empty for me (besides mansectf(1) of course).  Perhaps instead
> the DESCRIPTION can explicitly state this.  Something akin to "This
> command uses the same interface as mansect(1)."
> 
> [...]
> > +#!/bin/bash
> > +#
> > +# Copyright, the authors of the Linux man-pages project
> > +# SPDX-License-Identifier: GPL-3.0-or-later
> > +
> > +set -Eefuo pipefail;
> > +
> > +mansect "$@" \
> > +| man /dev/stdin;
> 
> Thinking about it, one thing I did like from v1 that would be nice to
> keep is the specified sections being case-insensitive.  Since the
> section headers should always be in uppercase,

This is not necessarily true, and in fact I plan to change that
eventually.

The reason I haven't done that yet is that I'm wondering what would be
the best way to refer to sections in running text.  Currently, we refer
to them by name, and the fact that the name is upper-case makes it
obvious.

Still, if you want case insensitivity, since the section is a PCRE2
pattern, you could use '(?i)' (see pcre2pattern(3)):

	$ man -w snprintf | MANWIDTH=64 xargs mansectf '(?i)name' | cat
	snprintf(3)         Library Functions Manual        snprintf(3)

	NAME
	     snprintf, vsnprintf - string print formatted

	Linux man‐pages 6.16‐43... 2025‐12‐07               snprintf(3)


Have a lovely day!
Alex

> specifying them in
> lowercase when invoking mansectf(1) shouldn't introduce any ambiguity
> (i.e. "Does the user want the 'NAME' or 'Name' section?").
> 
> -- 
> Take care,
> 	Seth McDonald.
> 
> On-list:  2336 E8D2 FEB1 5300 692C  62A9 5839 6AD8 9243 D369
> Off-list: 82B9 620E 53D0 A1AE 2D69  6111 C267 B002 0A90 0289



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

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

  reply	other threads:[~2026-01-29 11:27 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-27  9:20 [RFC PATCH v1 0/2] New sman(1) script Seth McDonald
2026-01-27  9:20 ` [RFC PATCH v1 1/2] src/bin/sman: Add script Seth McDonald
2026-01-28 16:52   ` наб
2026-01-28 17:19     ` Alejandro Colomar
2026-01-28 19:07     ` G. Branden Robinson
2026-01-28 22:02       ` наб
2026-01-28 22:31         ` G. Branden Robinson
2026-01-27  9:20 ` [RFC PATCH v1 2/2] man/man1/sman.1: Add man page Seth McDonald
2026-01-27 13:47 ` [RFC PATCH v1 0/2] New sman(1) script Alejandro Colomar
2026-01-28  4:44   ` Seth McDonald
2026-01-28  5:48     ` G. Branden Robinson
2026-01-28 14:36       ` Alejandro Colomar
2026-01-28 14:47     ` Alejandro Colomar
2026-01-28 18:55 ` [PATCH v2] src/bin/mansectf, man/man1/mansectf.1: Add program and manual page Alejandro Colomar
2026-01-29  5:50   ` Seth McDonald
2026-01-29 11:27     ` Alejandro Colomar [this message]
2026-01-29 14:31     ` New PARAMETERS section in manual pages (was: [PATCH v2] src/bin/mansectf, man/man1/mansectf.1: Add program and manual page) Alejandro Colomar
2026-01-29 20:24       ` G. Branden Robinson
2026-01-29 22:06         ` Alejandro Colomar
2026-01-29 22:20           ` G. Branden Robinson

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=aXtB34FpfoybBAkN@devuan \
    --to=alx@kernel.org \
    --cc=branden@debian.org \
    --cc=douglas.mcilroy@dartmouth.edu \
    --cc=linux-man@vger.kernel.org \
    --cc=nabijaczleweli@nabijaczleweli.xyz \
    --cc=sethmcmail@pm.me \
    /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