linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Corbet <corbet@lwn.net>
To: Dan Williams <dan.j.williams@intel.com>,
	Matthew Wilcox <willy@infradead.org>,
	Dan Williams <dan.j.williams@intel.com>
Cc: "Peter Zijlstra" <peterz@infradead.org>,
	torvalds@linux-foundation.org,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Ira Weiny" <ira.weiny@intel.com>,
	"Jonathan Cameron" <jonathan.cameron@huawei.com>,
	"Jesse Brandeburg" <jesse.brandeburg@intel.com>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	"Lukas Wunner" <lukas.wunner@intel.com>,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	gregkh@linuxfoundation.org, linux-doc@vger.kernel.org
Subject: Re: [PATCH] cleanup: Add usage and style documentation
Date: Sun, 24 Mar 2024 03:08:54 -0600	[thread overview]
Message-ID: <871q802dzt.fsf@meer.lwn.net> (raw)
In-Reply-To: <65ff7a88e93fb_2690d29429@dwillia2-mobl3.amr.corp.intel.com.notmuch>

Dan Williams <dan.j.williams@intel.com> writes:

> Matthew Wilcox wrote:
>> On Fri, Mar 22, 2024 at 12:10:38PM -0700, Dan Williams wrote:
>> > Peter Zijlstra wrote:
>> > > So I despise all that RST stuff. It makes what should be trivially
>> > > readable text into a trainwreck. We're coders, we use text editors to
>> > > read comments.
>> > 
>> > Ok, I will rip out the RST stuff and just make this a standalone comment.
>> 
>> I would rather you ignored Peter's persistent whining about RST and
>> kept the formatting.

Dealing with that is definitely the least pleasant part of trying to
maintain docs...

> Hmm, how about split the difference and teach scripts/kernel-doc to treat
> Peter's preferred markup for a C code example as a synonym, i.e.
> effectively a search and replace of a line with only:
>
> 	Ex.
>
> ...with:
>
> 	.. code-block:: c
>
> ...within a kernel-doc DOC: section?

I'm not convinced that "Ex." is a clearer or more readable syntax, and
I'd prefer to avoid adding to the regex hell that kernel-doc already is
or adding more special syntax of our own.  How about, as Lukas
suggested, just using the "::" notation?  You get a nice literal block,
albeit without the syntax highlighting -- a worthwhile tradeoff, IMO.

Thanks,

jon

  parent reply	other threads:[~2024-03-24  9:09 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-20 22:04 [PATCH] cleanup: Add usage and style documentation Dan Williams
2024-03-22  5:43 ` Tian, Kevin
2024-03-23  0:17   ` Dan Williams
2024-03-23 18:01     ` Markus Elfring
2024-03-22  9:06 ` Peter Zijlstra
2024-03-22 19:10   ` Dan Williams
2024-03-23 20:44     ` Matthew Wilcox
2024-03-24  0:57       ` Dan Williams
2024-03-24  6:23         ` Lukas Wunner
2024-03-24  9:08         ` Jonathan Corbet [this message]
2024-03-24 20:37           ` Dan Williams
2024-03-22 13:00 ` Markus Elfring
2024-03-22 13:48   ` Greg Kroah-Hartman
2024-03-22 13:34 ` Bjorn Helgaas
2024-03-25 18:52   ` Dan Williams
2024-03-22 13:45 ` Matthew Wilcox
2024-03-25 22:57 ` [PATCH v2] " Dan Williams
2024-03-26 12:06   ` Markus Elfring
2024-03-26 15:35   ` Jonathan Corbet
2024-03-26 16:51     ` Dan Williams
2024-03-26 16:56   ` Jonathan Cameron
2024-03-26 17:49   ` Dan Williams
2024-03-26 17:53   ` Dan Williams

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=871q802dzt.fsf@meer.lwn.net \
    --to=corbet@lwn.net \
    --cc=bhelgaas@google.com \
    --cc=dan.j.williams@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=ira.weiny@intel.com \
    --cc=jesse.brandeburg@intel.com \
    --cc=jonathan.cameron@huawei.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lukas.wunner@intel.com \
    --cc=peterz@infradead.org \
    --cc=torvalds@linux-foundation.org \
    --cc=willy@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).