From: Trevor Woerner <twoerner@gmail.com>
To: Antonin Godard <antonin.godard@bootlin.com>
Cc: quentin.schulz@cherry.de, docs@lists.yoctoproject.org
Subject: Re: [docs] [PATCH 00/10] docs: highlight BitBake snippets with the bitbake language
Date: Wed, 26 Aug 2026 09:25:39 -0400 [thread overview]
Message-ID: <ao7pU4NN4uuZDzS1@localhost.localdomain> (raw)
In-Reply-To: <DKYWEFNK1215.22ZC7DOYBOIH9@bootlin.com>
On Wed 2026-08-26 @ 03:09:23 PM, Antonin Godard wrote:
> Hi,
>
> On Wed Aug 26, 2026 at 2:10 PM CEST, Quentin Schulz via lists.yoctoproject.org wrote:
> > Hi Trevor,
> >
> > On 8/26/26 3:34 AM, Trevor Woerner via lists.yoctoproject.org wrote:
> >> Pygments 2.21.0 added a BitBake lexer, so BitBake snippets can now say
> >> what they are instead of rendering as plain literal blocks. This tags
> >> the ones in yocto-docs.
> >>
> >> One patch per manual, which is also roughly one reviewable unit per
> >> patch. No prose changes, no reflowing, no reindenting - every hunk turns
> >> a literal-block introducer into a code-block directive and nothing else.
> >>
> >> Which blocks were converted was decided by reading, not by pattern
> >
> > "by reading" following a paragraph definitely not written by you and
> > with all commits being AI-Generated is quite the stretch ;)
When I asked AI to add explicit code-blocks with explicit language tags
I emphasized it should read the entire block before deciding. At work I
am the head of a massive project to convert some of our documentation
from wiki to reST and was caught a couple times by this.
Bitbake syntax has a tendency to sometimes look like bash, and sometimes
look like python, so I wanted to make sure AI was being careful about
the languages it was guessing.
In fact I pushed back on some of the choices when it selected python
instead of bitbake, but then it pushed back on me and said: "yes it's a
bitbake example, but this code snippet is entirely python" and in some
rare cases it was actually correct.
So this "by reading" statement was probably AI's way of saying: "i was
careful about the choices i made", rather than implying that "Trevor
read each one and decided".
> >
> > [...]
> >
> >> Depends on
> >> ----------
> >>
> >> "docs: state the language of nine literal blocks explicitly", sent
> >
> > Link to the ML please to make maintainers and reviewers job easier.
> >
> > [...]
> >
> > I think this is going the wrong direction. We should actually make
> > explicit the language of every :: that is NOT to be understood as
> > BitBake code and then make the default highlight language be BitBake.
>
> But then this might get forgotten? How about having the default highlighted as
> "none", and make _everything_ use explicit code-blocks?
>
> Sure, this is more efforts and review time, but also this is how other markup
> languages work - like markdown, where by default (when using ```...```) no
> syntax highlighting is done.
>
> This is maybe a more conservative approach but at least it doesn't leave room
> for code blocks mistakenly highlighted with the bitbake lexer.
Yes, I agree too. Personally I'm not fond of "hidden defaults".
By default a non-specified block will cause pygments to guess. So if I'm
looking at a lot of reST and seeing no tags, I'm going to assume the
authors have left pygments to guess. I would have to go looking in other
places to see if there's a default in place for non-specified code-block
tags, which I'm probably not going to think of doing, which will
sometimes probably cause more confusion before it becomes clear.
Maybe it's just me, but I prefer to see every example block using an
explicit code-block tag and specifying a language. That way the author's
intentions are unambiguous, and we have an expected output.
That's what I've enforced for our reST at work, and I've also
differentiated between "bash" (for actual shell programs) versus
"console" (for interactive work at a shell prompt, a shell most likely
to be bash).
next prev parent reply other threads:[~2026-08-26 13:25 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-26 1:34 [PATCH 00/10] docs: highlight BitBake snippets with the bitbake language Trevor Woerner
2026-08-26 1:34 ` [PATCH 01/10] ref-manual/variables.rst: use the bitbake code-block language Trevor Woerner
2026-08-26 1:34 ` [PATCH 02/10] ref-manual: " Trevor Woerner
2026-08-26 1:34 ` [PATCH 03/10] dev-manual: " Trevor Woerner
2026-08-26 1:34 ` [PATCH 04/10] migration-guides: " Trevor Woerner
2026-08-26 1:34 ` [PATCH 05/10] kernel-dev: " Trevor Woerner
2026-08-26 1:34 ` [PATCH 06/10] test-manual: " Trevor Woerner
2026-08-26 1:34 ` [PATCH 07/10] overview-manual: " Trevor Woerner
2026-08-26 1:34 ` [PATCH 08/10] security-manual: " Trevor Woerner
2026-08-26 1:34 ` [PATCH 09/10] sdk-manual: " Trevor Woerner
2026-08-26 1:34 ` [PATCH 10/10] docs-wide: " Trevor Woerner
2026-08-26 11:56 ` [PATCH 00/10] docs: highlight BitBake snippets with the bitbake language Paul Barker
2026-08-26 13:29 ` Trevor Woerner
2026-08-26 12:10 ` [docs] " Quentin Schulz
2026-08-26 13:09 ` Antonin Godard
2026-08-26 13:25 ` Trevor Woerner [this message]
2026-08-26 14:45 ` Quentin Schulz
2026-08-26 19:56 ` Trevor Woerner
2026-08-27 14:33 ` Quentin Schulz
2026-08-31 9:01 ` Antonin Godard
2026-08-31 13:18 ` Trevor Woerner
2026-08-31 14:16 ` Trevor Woerner
2026-08-31 15:19 ` Antonin Godard
2026-08-31 15:55 ` Trevor Woerner
2026-09-01 7:31 ` Antonin Godard
2026-08-26 14:34 ` Quentin Schulz
2026-08-26 15:10 ` Antonin Godard
2026-08-26 15:43 ` Quentin Schulz
2026-08-27 8:02 ` Antonin Godard
2026-08-27 8:38 ` Antonin Godard
2026-08-27 11:34 ` Trevor Woerner
2026-08-27 12:16 ` Antonin Godard
2026-08-27 14:23 ` Quentin Schulz
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=ao7pU4NN4uuZDzS1@localhost.localdomain \
--to=twoerner@gmail.com \
--cc=antonin.godard@bootlin.com \
--cc=docs@lists.yoctoproject.org \
--cc=quentin.schulz@cherry.de \
/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