From: Akira Yokosawa <akiyks@gmail.com>
To: Bagas Sanjaya <bagasdotme@gmail.com>
Cc: corbet@lwn.net, linux-kernel@vger.kernel.org,
linux-next@vger.kernel.org, paulmck@kernel.org,
rcu@vger.kernel.org
Subject: Re: [PATCH] Documentation: RCU: use code blocks with autogenerated line (was: Re: linux-next: build warning after merge of the rcu tree)
Date: Tue, 8 Nov 2022 23:53:46 +0900 [thread overview]
Message-ID: <fd1903d4-a721-931e-c928-1818cd650490@gmail.com> (raw)
In-Reply-To: <206a95eb-5430-f9bf-15ad-4e644393255e@gmail.com>
[Dropping most CCs]
On Tue, 8 Nov 2022 09:29:01 +0700, Bagas Sanjaya wrote:
> On 11/7/22 18:48, Akira Yokosawa wrote:
>> That might be true if all you care about were the generated documents,
>> but we need to pay attention to readers of .rst files as plain-text.
>>
>> There are a bunch of references to line numbers in RCU documents.
>> If explicit line numbers are removed from snippets, such readers need
>> to count the lines by themselves, which doesn't sound reasonable to me.
>>
>
> I think only rcubarrier.rst have explicit references to line numbers.
Oh, I find such references in (not limited to):
- Documentation/RCU/Design/Requirements/Requirements.rst
- Documentation/RCU/Design/Data-Structures/Data-Structures.rst
>
> Also, besides manual line counting, readers seeing rst sources can deduce
> where actually the lines are from explanation of the snippet.
Maybe, maybe not... Deducing may take time.
> Of course
> they can make htmldocs and seeing the output if they want.
There can be situations where you can't afford such luxuries.
Remember there is a note in Documentation/doc-guide/sphinx.rst
which reads:
Please don't go overboard with reStructuredText markup. Keep it simple.
For the most part the documentation should be plain text with just enough
consistency in formatting that it can be converted to other formats.
My interpretation of above:
.rst sources should be kept as close to plain-text which can be
easily understood in dumb terminals, as far as possible.
>
>> If you can put labels to referenced lines within code snippets, auto
>> generation of line numbers might work, but as far as I know, Sphinx
>> doesn't provide such a nice feature.
>>
>
> There's also :emphasize-lines: option to highlight selected line numbers.
But that option doesn't do any highlighting while viewing .rst files
as plain-text. What am I missing?
Thanks, Akira
>
> Thanks.
>
next prev parent reply other threads:[~2022-11-08 14:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-07 3:26 linux-next: build warning after merge of the rcu tree Stephen Rothwell
2022-11-07 5:02 ` Paul E. McKenney
2022-11-07 9:55 ` [PATCH] Documentation: RCU: use code blocks with autogenerated line (was: Re: linux-next: build warning after merge of the rcu tree) Bagas Sanjaya
2022-11-07 11:48 ` Akira Yokosawa
2022-11-07 17:50 ` Paul E. McKenney
2022-11-08 2:29 ` Bagas Sanjaya
2022-11-08 14:53 ` Akira Yokosawa [this message]
2022-11-09 8:28 ` Bagas Sanjaya
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=fd1903d4-a721-931e-c928-1818cd650490@gmail.com \
--to=akiyks@gmail.com \
--cc=bagasdotme@gmail.com \
--cc=corbet@lwn.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=paulmck@kernel.org \
--cc=rcu@vger.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