All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Randy Dunlap <rdunlap@infradead.org>,
	"open list:DOCUMENTATION" <linux-doc@vger.kernel.org>
Subject: Re: typedef output question/issue?
Date: Thu, 21 Nov 2024 13:19:37 +0200	[thread overview]
Message-ID: <874j4025rq.fsf@intel.com> (raw)
In-Reply-To: <877c8w25sn.fsf@intel.com>

On Thu, 21 Nov 2024, Jani Nikula <jani.nikula@linux.intel.com> wrote:
> On Wed, 20 Nov 2024, Randy Dunlap <rdunlap@infradead.org> wrote:
>> Hi,
>>
>> If I print a typedef in html (make htmldocs) from a .rst file,
>> I see:
>>
>> type dma_cookie_t
>>     an opaque DMA cookie
>>
>> Description
>>
>> if dma_cookie_t is >0 it’s a DMA request cookie, <0 it’s an error code
>>
>> ~~~~~~~~~~~~~~~~~~~
>>
>> If I print the same typedef in man format, it says 'typedef' instead of
>> 'type', which is what I expect to see.
>
> I'm sorry, it's unambigous to me which one you expect.

*ambiguous, obvs!

>
>> man formatted output:
>>
>> Kernel API(9)                     API Manual                     Kernel API(9)
>>
>> NAME
>>        typedef dma_cookie_t - an opaque DMA cookie
>>
>> Description
>>        if dma_cookie_t is >0 it's a DMA request cookie, <0 it's an error code
>>
>> November 2024                    dma_cookie_t                    Kernel API(9)
>
> How do you generate the man pages?
>
>> I am using python311-Sphinx 8.0.2-1.2-noarch from openSUSE.
>>
>> [internet search ...]
>>
>> The $internet says that one option is to install and use:
>> Add 'sphinx_autodoc_typehints' to the extensions list in your conf.py file.
>> I tried that but now I get:
>> Extension error:
>> Unknown event name: autodoc-process-signature
>
> The kernel-doc thing is not hooked up in the Sphinx autodoc processing,
> which is more geared towards Python. I presume sphinx_autodoc_typehints
> uses autodoc-process-signature which isn't there because the autodoc
> Sphinx extension isn't loaded, and even if it were, would not be called
> on kernel-doc handling.
>
>
> BR,
> Jani.
>
>
>>
>> Another option is to try a different theme so I reverted to
>> sphinx_rtd_theme but that didn't help either.
>>
>> Does anyone know a good solution to this?
>>
>> thanks.

-- 
Jani Nikula, Intel

  reply	other threads:[~2024-11-21 11:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-21  4:59 typedef output question/issue? Randy Dunlap
2024-11-21 11:19 ` Jani Nikula
2024-11-21 11:19   ` Jani Nikula [this message]
2024-11-21 17:38     ` Randy Dunlap
2024-11-21 19:28       ` Jani Nikula
2024-11-25  0:05         ` Randy Dunlap

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=874j4025rq.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=rdunlap@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.