mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "G. Branden Robinson" <g.branden.robinson@gmail.com>
To: Alejandro Colomar <alx@kernel.org>
Cc: astian <astian@memeware.net>,
	linux-man <linux-man@vger.kernel.org>,
	libc-alpha@sourceware.org, Thomas Gleixner <tglx@kernel.org>,
	Andy Lutomirski <luto@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Markdown as a "less hairy" source format for man pages (was: ioperm(2): confusing terminology)
Date: Tue, 15 Sep 2026 10:39:13 -0500	[thread overview]
Message-ID: <20260915153913.gn4lupmyydvtehnw@illithid> (raw)
In-Reply-To: <aqfsMbQWdqq_TG_b@devuan>

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

Hi Alex,

At 2026-09-14T14:56:21+0200, Alejandro Colomar wrote:
> > Date: 2026-09-13 06:29:43+0000
> > From: astian <astian@memeware.net>
> > Sorry, I've never written *roff before
> 
> I've never written roff(7) myself, but luckily, man(7) is much simpler
> than roff(7).
> 
> > and I don't think I want to spend my time learning that... although,
> > I might be able do this by just blindly replacing words without
> > touching the escapes...
> 
> Indeed, that's how I learnt man(7).  Replacing words blindly is quite
> easier than it seems.  I was also scared the first time I wanted to
> fix a bug in a manual page, but I found it was easier than I thought.
> 
> > Which bring up the question, why not moving to a less hairy source
> > format?
> 
> This question comes up every now and then.  TL;DR: other formats are
> worse.
> 
> man(7) is pretty simple, and easy to learn exactly by editing words
> blindly.  There are very few macros, and their behavior is trivial
> once you use them a few times.
> 
> One thing that is very important is that we use semantic newlines.
> That discards .md and .rst, since they are meant to be written with
> paragraphs as they'd be read by humans.  mdoc(7) is more complex than
> man(7), and thus we don't want that.  There are other formats, also
> inappropriate, for the same or other reasons.
[...]

Another reason to not underestimate the "hairiness" of "plain text"
markup languages relative to man(7) is revealed by the sorts of trouble
that people get into with at least some of its dialects.

Here's an example from the util-linux project, which maintains its man
pages in AsciiDoc.

commit 36e1fb5802c0948f13ba0ec4ac68c94cb24856db
Author: Thomas Weißschuh <thomas@t-8ch.de>
Date:   Mon Apr 27 15:24:47 2026 +0200

    lastlog2: (man) fix example syntax

    The examples are not using the right syntax for literal blocks,
    leading to errors from asciidoctor.

    Use the correct syntax.

    Fixes: cd112d860bf6 ("lastlog2: add --journal option to manage SQLite journal mode")
    Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>

diff --git a/misc-utils/lastlog2.8.adoc b/misc-utils/lastlog2.8.adoc
index b8fcb055c..20a971242 100644
--- a/misc-utils/lastlog2.8.adoc
+++ b/misc-utils/lastlog2.8.adoc
@@ -91,19 +91,19 @@
 == EXAMPLES

 Display the current journal mode:
-----
+....
 lastlog2 -j
-----
+....

 Enable WAL mode for better concurrency (recommended for high-traffic servers):
-----
+....
 lastlog2 -j WAL
-----
+....

 Switch back to the default DELETE mode:
-----
+....
 lastlog2 -j DELETE
-----
+....

 == FILES
---end snip; there was much more in the same vein after this---

Not long ago I diagnosed our industry's collective, and persistent,
refusal to believe that writing worthwhile documentation could ever be a
more demanding task than the simplest computer program one can code.

https://lore.kernel.org/linux-man/20260710195854.ud4riftmhrfzu54d@illithid/

Regards,
Branden

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

      reply	other threads:[~2026-09-15 15:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <DLDOCNQUCW9N.3GGL01BMV0HNG@memeware.net>
     [not found] ` <aqXOgqne-v4GtglY@devuan>
2026-09-12 22:48   ` ioperm(2): confusing terminology Alejandro Colomar
2026-09-13  6:29   ` astian
2026-09-14 12:56     ` Alejandro Colomar
2026-09-15 15:39       ` G. Branden Robinson [this message]

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=20260915153913.gn4lupmyydvtehnw@illithid \
    --to=g.branden.robinson@gmail.com \
    --cc=alx@kernel.org \
    --cc=astian@memeware.net \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-man@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=tglx@kernel.org \
    /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

all inboxes | Powered by JetHome®