public inbox for linux-arch@vger.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: Kernel Hardening <kernel-hardening@lists.openwall.com>,
	Farhan Ali <alifm@linux.ibm.com>,
	Will Deacon <will.deacon@arm.com>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Jaroslav Kysela <perex@perex.cz>,
	Evgeniy Polyakov <zbr@ioremap.net>,
	"open list:GENERIC INCLUDE/A..." <linux-arch@vger.kernel.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Halil Pasic <pasic@linux.ibm.com>,
	Alan Stern <stern@rowland.harvard.edu>,
	Jiri Slaby <jslaby@suse.com>, Guenter Roeck <linux@roeck-us.net>,
	Ohad Ben-Cohen <ohad@wizery.com>,
	Marc Zyngier <marc.zyngier@arm.com>,
	Boqun Feng <boqun.feng@gmail.com>,
	Nicholas Piggin <npiggin@gmail.com>,
	Alex Williamson <alex.williamson@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>, Sean Paul <sean@poorly.run>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-wireless@vger.kernel.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>l
Subject: Re: [PATCH v1 12/22] docs: driver-api: add .rst files from the main dir
Date: Wed, 19 Jun 2019 07:22:18 -0300	[thread overview]
Message-ID: <20190619072218.4437f891@coco.lan> (raw)
In-Reply-To: <CAKMK7uGM1aZz9yg1kYM8w2gw_cS6Eaynmar-uVurXjK5t6WouQ@mail.gmail.com>

Hi Daniel,

Em Wed, 19 Jun 2019 11:05:57 +0200
Daniel Vetter <daniel@ffwll.ch> escreveu:

> On Tue, Jun 18, 2019 at 10:55 PM Mauro Carvalho Chehab
> <mchehab+samsung@kernel.org> wrote:
> > diff --git a/Documentation/gpu/drm-mm.rst b/Documentation/gpu/drm-mm.rst
> > index fa30dfcfc3c8..b0f948d8733b 100644
> > --- a/Documentation/gpu/drm-mm.rst
> > +++ b/Documentation/gpu/drm-mm.rst
> > @@ -320,7 +320,7 @@ struct :c:type:`struct file_operations <file_operations>` get_unmapped_area
> >  field with a pointer on :c:func:`drm_gem_cma_get_unmapped_area`.
> >
> >  More detailed information about get_unmapped_area can be found in
> > -Documentation/nommu-mmap.rst
> > +Documentation/driver-api/nommu-mmap.rst  
> 
> Random drive-by comment: Could we convert these into hyperlinks within
> sphinx somehow, without making them less useful as raw file references
> (with vim I can just type 'gf' and it works, emacs probably the same).
> -Daniel

Short answer: I don't know how vim/emacs would recognize Sphinx tags.

There are two ways of doing hyperlinks to local files. The first one is to 
add a label at the other file and use a reference to such label, e. g. at
nommu-mmap.rst, you would add a label like:

	.. _drm_nommu-mmap:

at the beginning of the file.

Then, at drm-mm.rst, you would use :ref:`drm_nommu-mmap` (there are a
few other alternative tags that would work the same way).

The advantage is that you could move/rename documents anytime, without
needing to take care of it.

Perhaps it could be possible a tool like cscope to parse those in
order to provide such automation for Sphinx. I dunno.

-

The other way is to use:

	:doc:`nommu-mmap.rst` (if both files are at the same dir)

The :doc: path is the current directory. So, if a file at, let's say,
Documentation/gpu wants to refer another file at driver-api, it would
need to write it as:

	:doc:`../driver-api/nommu-mmap.rst`

I'm not sure if vim/emacs recognizes this syntax, though.

Perhaps this tag could be used as:

	:doc:`Documentation/driver-api/nommu-mmap.rst <../driver-api/nommu-map.rst`

But that looks too ugly to my taste.

-

On this conversion, I opted to not touch this. We may consider trying
to replace those 


Thanks,
Mauro
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2019-06-19 10:22 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1560890771.git.mchehab+samsung@kernel.org>
2019-06-18 20:53 ` [PATCH v1 12/22] docs: driver-api: add .rst files from the main dir Mauro Carvalho Chehab
2019-06-19  8:24   ` Thierry Reding
2019-06-19  9:05   ` Daniel Vetter
2019-06-19 10:22     ` Mauro Carvalho Chehab [this message]
2019-06-19 10:42       ` Peter Zijlstra
2019-06-19 13:07         ` Mauro Carvalho Chehab
2019-06-19 14:13         ` Jonathan Corbet
2019-06-19 11:43   ` Peter Zijlstra
2019-06-19 11:45     ` Peter Zijlstra
2019-06-19 11:50       ` Peter Zijlstra
2019-06-19 12:50   ` Andrea Parri
     [not found] <cover.1560891322.git.mchehab+samsung@kernel.org>
2019-06-18 21:05 ` Mauro Carvalho Chehab
2019-06-18 21:05   ` Mauro Carvalho Chehab

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=20190619072218.4437f891@coco.lan \
    --to=mchehab+samsung@kernel.org \
    --cc=alex.williamson@redhat.com \
    --cc=alifm@linux.ibm.com \
    --cc=boqun.feng@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.com \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=marc.zyngier@arm.com \
    --cc=npiggin@gmail.com \
    --cc=ohad@wizery.com \
    --cc=pasic@linux.ibm.com \
    --cc=perex@perex.cz \
    --cc=rafael@kernel.org \
    --cc=sean@poorly.run \
    --cc=stern@rowland.harvard.edu \
    --cc=tglx@linutronix.de \
    --cc=will.deacon@arm.com \
    --cc=zbr@ioremap.net \
    /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