Re: Minor RST rant

Matthew Wilcox
2020-07-24T17:41:36Z

On Fri, Jul 24, 2020 at 01:22:00PM -0400, Steven Rostedt wrote:
> I like how RST can help make for a better grouping of our documents
> and put it into other formats. But I have to rant a little because I'm
> currently experiencing some of the frustration that Peter commonly
> complains about.

Thanks for bringing this up in such a constructive manner.
I'm sympathetic to these concerns.

> Then I went to Documentation/filesystems/path-lookup.rst, and found
> myself constantly re-reading the same paragraph over again, and losing
> track of what I'm reading. I realized it wasn't due to the writing, but
> due to the constant inserted markup of quotes, that makes it terribly
> annoying to read, and unfortunately, not enjoyable at all.
>
> For example:
>
> > It is tempting to describe the second kind as starting with a
> > component, but that isn't always accurate: a pathname can lack both
> > slashes and components, it can be empty, in other words. This is
> > generally forbidden in POSIX, but some of those "xxx``at``" system calls
> > in Linux permit it when the ``AT_EMPTY_PATH`` flag is given. For
> > example, if you have an open file descriptor on an executable file you
> > can execute it by calling `execveat() <execveat_>`_ passing
> > the file descriptor, an empty path, and the ``AT_EMPTY_PATH`` flag.
>
> All those `` are throwing me off to understanding what is being written.
>
> I don't even know what those are suppose to represent.

Great example. Some people definitely go too far with rst markup, and
we generally try to discourage it. And I'm pretty sure we take patches
to remove excessive markup where it's gone too far [1].

You can see how this renders in html at
https://www.kernel.org/doc/html/latest/filesystems/path-lookup.html or
run 'make htmldocs' to build it locally. Personally, I don't think
the markup style it uses works very well in the html either.

I'd like to see this paragraph written as:

> It is tempting to describe the second kind as starting with a
> component, but that isn't always accurate: a pathname can lack both
> slashes and components, it can be empty, in other words. This is
> generally forbidden in POSIX, but some of the "*at()" system calls
> in Linux permit it when the ``AT_EMPTY_PATH`` flag is given. For
> example, if you have an open file descriptor on an executable file you
> can execute it by calling execveat() passing the file descriptor, an
> empty path, and the ``AT_EMPTY_PATH`` flag.

I think we're all pretty comfortable seeing function names adorned with
a closing pair of parens. The ``...`` to adorn constants feels OK to me,
but maybe not to you? If that feels excessive, can you suggest something
that would distinguish between POSIX and AT_EMPTY_PATH?

[1] Too far being a subjective measure, of course. My preferences
are on display in core-api/xarray.rst