From: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
To: Jonathan Corbet <corbet@lwn.net>
Cc: linux-doc@vger.kernel.org, Matthew Wilcox <willy@infradead.org>,
Jani Nikula <jani.nikula@linux.intel.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] Docs: An initial automarkup extension for sphinx
Date: Sat, 22 Jun 2019 14:46:10 -0300 [thread overview]
Message-ID: <20190622144610.26b7d99c@coco.lan> (raw)
In-Reply-To: <20190622084346.28c7c748@lwn.net>
Em Sat, 22 Jun 2019 08:43:46 -0600
Jonathan Corbet <corbet@lwn.net> escreveu:
> On Fri, 21 Jun 2019 22:00:46 -0300
> Mauro Carvalho Chehab <mchehab+samsung@kernel.org> wrote:
>
> > > +#
> > > +# The DVB docs create references for these basic system calls, leading
> > > +# to lots of confusing links. So just don't link them.
> > > +#
> > > +Skipfuncs = [ 'open', 'close', 'write' ]
> >
> > and yeah, of course, if there's something weird, it has to be at
> > the media docs :-)
> >
> > Btw, if I'm not mistaken, we do the same for ioctl.
>
> So that's actually interesting. In, for example,
> Documentation/media/uapi/v4l/func-ioctl.rst, you see something that looks
> like this:
>
> > .. c:function:: int ioctl( int fd, int request, void *argp )
> > :name: v4l2-ioctl
>
> Some digging around didn't turn up any documentation for :name:, but it
> seems to prevent ioctl() from going into the list of functions that can be
> cross-referenced.
It took me a while to discover this way to be able to re-define the
name of a symbol at the C domain, but I'm pretty sure I read this
somewhere at the Sphinx docs (or perhaps on some bug track or Stack
Overflow).
I don't remember exactly where I get it, but I guess it is related to
this:
http://docutils.sourceforge.net/docs/howto/rst-roles.html
> I wonder if the same should be done for the others?
Sure.
> I think that would be better than putting a special-case hack into the
> toolchain.
Agreed. As you're doing this, if you prefer, feel free to send the
patches to media docs. Otherwise, I'll seek for some time next week.
>
> > I'm wandering if this could also handle the Documentation/* auto-replace.
>
> I think it's the obvious place for it, yes. Let's make sure I haven't
> badly broken anything with the existing change first, though :)
Yeah, sure. Just wanted to place the code at the same thread. There are
some tricks that need to be done in order to handle the relative paths.
It took me a lot more time to get it right than adding the replacing Regex :-)
(That reminds I should post a patch to one place where we have a
Documentation/Documentation typo)
Thanks,
Mauro
next prev parent reply other threads:[~2019-06-22 17:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-21 23:51 [PATCH 0/3 v2] docs: function automarkup, now with 80% fewer regexes! Jonathan Corbet
2019-06-21 23:51 ` [PATCH 1/3] Docs: An initial automarkup extension for sphinx Jonathan Corbet
2019-06-22 1:00 ` Mauro Carvalho Chehab
2019-06-22 14:43 ` Jonathan Corbet
2019-06-22 17:46 ` Mauro Carvalho Chehab [this message]
2019-06-24 14:29 ` Jonathan Corbet
2019-06-24 16:38 ` Mauro Carvalho Chehab
2019-06-24 11:30 ` Jani Nikula
2019-06-24 14:25 ` Jonathan Corbet
2019-06-21 23:51 ` [PATCH 2/3] docs: remove :c:func: annotations from xarray.rst Jonathan Corbet
2019-06-21 23:51 ` [PATCH 3/3] kernel-doc: Don't try to mark up function names Jonathan Corbet
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=20190622144610.26b7d99c@coco.lan \
--to=mchehab+samsung@kernel.org \
--cc=corbet@lwn.net \
--cc=jani.nikula@linux.intel.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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 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.