From: Mauro Carvalho Chehab <mchehab@s-opensource.com>
To: Jonathan Corbet <corbet@lwn.net>
Cc: Markus Heiser <markus.heiser@darmarit.de>,
Linux Media Mailing List <linux-media@vger.kernel.org>,
Mauro Carvalho Chehab <mchehab@infradead.org>,
linux-doc@vger.kernel.org
Subject: Re: [PATCH] doc-rst: get rid of warnings at kernel-documentation.rst
Date: Thu, 21 Jul 2016 07:22:29 -0300 [thread overview]
Message-ID: <20160721072229.699e2c5c@recife.lan> (raw)
In-Reply-To: <20160720170641.7836b1fe@lwn.net>
Em Wed, 20 Jul 2016 17:06:41 -0600
Jonathan Corbet <corbet@lwn.net> escreveu:
> On Wed, 20 Jul 2016 11:41:11 -0300
> Mauro Carvalho Chehab <mchehab@s-opensource.com> wrote:
>
> > > The thing with that is that a lot of literal blocks *do* have C code, even
> > > in kernel-documentation.rst. Setting that in conf.py would turn off all C
> > > highlighting. I think that might actually be a desirable outcome, but it
> > > would be good to make that decision explicitly.
> >
> > Agreed. Assuming "C" as default seems a good idea to me.
>
> "Agreed," but there was an implied question there that, I think, deserves
> consideration. Do we want to have a default highlighting language for
> literal blocks at all? Those blocks will contain ascii art diagrams,
> device-tree fragments, error message examples, and who knows what else.
> Even if the majority of them are C code, having Sphinx treat all of them
> as C is going to lead to a steady stream of warnings and a lot of extra
> markup in the text.
On the documents I edited after the media conversion, I'm explicitly
telling the language (either "c" or "none") on every block. Yet,
any change like that would require to revisit all pages to be sure.
So, changing the default should not cause any change. Yet, I think
that, if we'll be changing the default, the best is to do it as
early as possible.
> Plus I'm not convinced that more color eye candy in code fragments is
> actually helpful.
I use colors on the text editors I use to edit the code and on my
shell prompt. So, I'm suspect, but, at least to me, I prefer it
colored.
Yet, I would very much prefer if, instead of changing the colors for
some random C code, it would be adding hyperlinks to all API calls.
This is what Doxygen does. So, we can include real code examples,
and the user can use them to cross reference with the corresponding
API symbols, like here:
https://linuxtv.org/docs/libdvbv5/dvbv5-scan_8c-example.html
IMHO, we should mark all C codes as such, and then pursue the goal of
having an extension that would do the same.
> So I think I might actually argue in favor of Markus's suggestion and set
> the language to "none" by default. But others may feel strongly about
> having their bikeshed in full syntax-highlighted color. Opinions on the
> matter?
>
> Thanks,
>
> jon
Thanks,
Mauro
next prev parent reply other threads:[~2016-07-21 10:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-20 14:11 [PATCH] doc-rst: get rid of warnings at kernel-documentation.rst Mauro Carvalho Chehab
2016-07-20 14:23 ` Markus Heiser
2016-07-20 14:31 ` Jonathan Corbet
2016-07-20 14:41 ` Mauro Carvalho Chehab
2016-07-20 23:06 ` Jonathan Corbet
2016-07-21 10:22 ` Mauro Carvalho Chehab [this message]
2016-07-20 14:49 ` Markus Heiser
2016-07-20 15:06 ` Mauro Carvalho Chehab
2016-07-20 15:33 ` Markus Heiser
2016-07-21 10:25 ` Mauro Carvalho Chehab
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=20160721072229.699e2c5c@recife.lan \
--to=mchehab@s-opensource.com \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=markus.heiser@darmarit.de \
--cc=mchehab@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.