public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Sandiford <richard.sandiford@arm.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: hp@bitrange.com, gcc@gcc.gnu.org, gcc-patches@gcc.gnu.org,
	joseph@codesourcery.com
Subject: Re: [PATCH] Port GCC documentation to Sphinx
Date: Mon, 05 Jul 2021 14:03:23 +0100	[thread overview]
Message-ID: <mpto8bgud44.fsf@arm.com> (raw)
In-Reply-To: <83im1pgdpa.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 05 Jul 2021 15:14:25 +0300")

Eli Zaretskii <eliz@gnu.org> writes:
>> Hans-Peter Nilsson <hp@bitrange.com> writes:
>> > I've read the discussion downthread, but I seem to miss (a recap
>> > of) the benefits of moving to Sphinx.  Maybe other have too and
>> > it'd be a good idea to repeat them?  Otherwise, the impression
>> > is not so good, as all I see is bits here and there getting lost
>> > in translation.
>> 
>> Better cross-referencing is one big feature.
>
> See below: the Info format has some features in addition to
> cross-references that can make this a much smaller issue.  HTML has
> just the cross-references, so "when you are a hammer, every problem
> looks like a nail".
>
>> IMO this subthread has demonstrated why the limitations of info
>> formatting have held back the amount of cross-referencing in the
>> online html.
>
> I disagree with this conclusion, see below.
>
>> (And based on emperical evidence, I get the impression that far more
>> people use the online html docs than the info docs.)
>
> HTML browsers currently lack some features that make Info the format
> of choice for me when I need to use the documentation efficiently.
> The most important feature I miss in HTML browsers is the index
> search.  A good manual usually has extensive index (or indices) which
> make it very easy to find a specific topic one is looking for,
> i.e. use the manual as a reference (as opposed as a first-time
> reading, when you read large portions of the manual in sequence).
>
> Another important feature is regexp search across multiple sections
> (with HTML you'd be forced to download the manual as a single large
> file for that, and then you'll probably miss regexps).
>
> Yet another feature which, when needed, is something to kill for, is
> the "info apropos" command, which can search all the manuals on your
> system and build a menu from the matching sections found in different
> manuals.  And there are a few more.
>
> (Texinfo folks are working on JavaScript code to add some missing
> capabilities to Web browsers, but that effort is not yet complete.)

Whether info or HTML is the better format isn't the issue though.  The
point is that we do have HTML output that is (emperically) widely used.
And at the moment it isn't as good as it could be.

The question that I was replying to was: what is the benefit of moving
to Sphinx?  And one of the answers is that it improves the HTML output.

>> E.g. quoting from Richard's recent patch:
>> 
>>   @item -fmove-loop-stores
>>   @opindex fmove-loop-stores
>>   Enables the loop store motion pass in the GIMPLE loop optimizer.  This
>>   moves invariant stores to after the end of the loop in exchange for
>>   carrying the stored value in a register across the iteration.
>>   Note for this option to have an effect @option{-ftree-loop-im} has to 
>>   be enabled as well.  Enabled at level @option{-O1} and higher, except 
>>   for @option{-Og}.
>> 
>> In the online docs, this will just be plain text.  Anyone who doesn't
>> know what -ftree-loop-im is will have to search for it manually.
>
> First, even if there are no cross-references, manual search is not the
> best way.  It is much easier to use index-search:
>
>   i ftree TAB
>
> will display a list of options that you could be after, and you can
> simply choose from the list, or type a bit more until you have a
> single match.

Here too I was talking about this being plain text in the online docs,
i.e. in the HTML.

In HTML the user-friendly way of letting users answer the question
“what on earth is -ftree-loop-im” is to have “-ftree-loop-im” be a
hyperlink that goes straight to the documentation of the option.
Same for PDF when viewed digitally.

One of the things that the move to Sphinx does is give us those
hyperlinks.

> Moreover, adding cross-references is easy:
>
>   @item -fmove-loop-stores
>   @opindex fmove-loop-stores
>   Enables the loop store motion pass in the GIMPLE loop optimizer.  This
>   moves invariant stores to after the end of the loop in exchange for
>   carrying the stored value in a register across the iteration.
>   Note for this option to have an effect @option{-ftree-loop-im}
>   (@pxref{Optimize Options, -ftree-loop-im}) 
>   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>   has be enabled as well.  Enabled at level @option{-O1} and higher,
>   except for @option{-Og}.
>
> If this looks like too much work, a simple Texinfo macro (two, if you
> want an anchor where you point) will do.

But this would be redundant in HTML: “foo (see foo)”.

Also, the benefit of hyperlinks in HTML (not info) is that they can be
used outside of prose, such as in lists, without interrupting the flow.

>> Adding the extra references to the html (and pdf) output but dropping
>> them from the info sounds like a good compromise.
>
> But that's not what happens.

Not in the original patch, sure, but it's what I think Martin was
suggesting as a compromise (maybe I misunderstood).  The comment above
was supposed to be in support of doing that.

It sounds like those who use the info format (which includes me btw,
at least occasionally) are happy with the status quo in terms of which
links are present.  So the new links could be a non-info-only feature.

Thanks,
Richard

  reply	other threads:[~2021-07-05 13:03 UTC|newest]

Thread overview: 113+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1446990946.2994.192.camel@surprise>
     [not found] ` <e7f490fc-ab76-5bc5-5e94-1d9f00f34b62@suse.cz>
2021-05-13 11:45   ` RFC: Sphinx for GCC documentation Martin Liška
2021-05-31 13:25     ` GCC documentation: porting to Sphinx Martin Liška
2021-05-31 15:49       ` Michael Matz
2021-06-01  7:31         ` Martin Liška
2021-06-01 13:31           ` Michael Matz
2021-06-02  7:36             ` Martin Liška
2021-06-02 16:05               ` Joel Sherrill
2021-06-02 16:44                 ` Joseph Myers
2021-06-03 12:26                   ` Martin Liška
2021-06-03 17:16                     ` Joseph Myers
2021-06-04  7:27                       ` Martin Liška
2021-06-02 17:27       ` Joseph Myers
2021-06-10 14:06         ` Martin Liška
2021-06-10 16:49           ` Joseph Myers
2021-06-11 14:33             ` Martin Liška
2021-06-11 15:50               ` Joseph Myers
2021-06-11 18:48                 ` Koning, Paul
2021-06-23 13:13                 ` Martin Liška
2021-06-23 16:00                   ` Joseph Myers
2021-06-24 14:08                     ` Martin Liška
2021-06-25 13:11                       ` Martin Liška
2021-06-25 13:14                         ` Martin Liška
2021-06-28 10:23                         ` Arnaud Charlet
2021-06-28 10:44                           ` Martin Liška
2021-06-29 15:54                             ` Arnaud Charlet
2021-06-30  7:52                               ` Martin Liška
2021-08-10 15:43                                 ` Martin Liška
2021-08-27  9:31                                   ` Martin Liška
2021-06-28 12:01                         ` [PATCH] Port GCC documentation " Martin Liška
2021-06-28 15:33                           ` Joseph Myers
2021-06-29 10:09                             ` Martin Liška
2021-06-29 10:50                               ` Richard Earnshaw
2021-06-30  4:47                                 ` Martin Liška
2021-06-30 10:14                                   ` Richard Earnshaw
2021-06-30 11:58                                     ` Martin Liška
2021-06-29 16:57                               ` Eli Zaretskii
2021-06-29 18:01                                 ` Eli Zaretskii
2021-06-30 10:11                                 ` Martin Liška
2021-06-30 10:46                                   ` Martin Liška
2021-06-30 13:09                                   ` Eli Zaretskii
2021-07-01 12:44                                     ` Martin Liška
2021-07-01 13:33                                       ` Eli Zaretskii
2021-07-01 14:14                                         ` Martin Liška
2021-07-01 15:06                                           ` Michael Matz
2021-07-02  9:40                                             ` Martin Liška
2021-07-02 10:32                                               ` Eli Zaretskii
2021-07-01 15:44                                           ` Eli Zaretskii
2021-07-01 16:04                                             ` Martin Liška
2021-07-01 16:58                                               ` Eli Zaretskii
2021-07-02  9:30                                                 ` Martin Liška
2021-07-02 10:31                                                   ` Eli Zaretskii
2021-07-02 13:23                                                     ` Martin Liška
2021-07-02 23:53                                     ` Hans-Peter Nilsson
2021-07-05  9:17                                       ` Richard Sandiford
2021-07-05 12:14                                         ` Eli Zaretskii
2021-07-05 13:03                                           ` Richard Sandiford [this message]
2021-07-12 13:25                                       ` Benefits of using Sphinx documentation format Martin Liška
2021-07-12 13:39                                         ` Eli Zaretskii
2021-07-12 13:53                                           ` Jonathan Wakely
2021-07-12 14:05                                             ` Jonathan Wakely
2021-07-12 14:16                                               ` Eli Zaretskii
2021-07-12 14:34                                                 ` Martin Liška
2021-07-12 17:09                                                   ` Eli Zaretskii
2021-07-12 14:12                                             ` Eli Zaretskii
2021-07-12 14:30                                               ` Martin Liška
2021-07-12 14:54                                                 ` Matthias Kretz
2021-07-12 17:03                                                   ` Eli Zaretskii
2021-07-12 17:15                                                     ` Jonathan Wakely
2021-07-12 17:23                                                       ` Eli Zaretskii
2021-07-12 17:33                                                         ` Jonathan Wakely
2021-07-13  6:24                                                       ` Richard Biener
2021-07-13 11:52                                                         ` Eli Zaretskii
2021-07-13 12:46                                                           ` Richard Biener
2021-07-13 12:55                                                             ` Eli Zaretskii
2021-08-09 12:12                                                           ` Martin Liška
2021-07-13 14:19                                                         ` Jonathan Wakely
2021-07-12 14:52                                               ` Jonathan Wakely
2021-07-12 14:54                                                 ` Jonathan Wakely
2021-07-12 17:14                                                   ` Eli Zaretskii
2021-07-12 15:03                                                 ` Jonathan Wakely
2021-07-12 16:00                                                   ` Gavin Smith
2021-07-12 16:15                                                     ` Jonathan Wakely
2022-07-05 12:27                                                       ` Copiable anchor links in gcc manual Gavin Smith
2022-07-05 13:28                                                         ` Jonathan Wakely
2021-07-12 14:37                                           ` Benefits of using Sphinx documentation format Martin Liška
2021-07-12 17:12                                             ` Eli Zaretskii
2021-07-12 16:36                                         ` David Malcolm
2021-07-12 18:23                                           ` Koning, Paul
2021-06-30 12:26                                 ` [PATCH] Port GCC documentation to Sphinx Martin Liška
2021-06-30 13:28                                 ` Martin Liška
2021-06-30 13:38                                   ` Eli Zaretskii
2021-06-30 14:04                                     ` Martin Liška
2021-06-30 15:43                                       ` Eli Zaretskii
2021-07-01 12:31                                         ` Martin Liška
2021-07-12 17:18                               ` Martin Sebor
2021-08-09 12:18                                 ` Martin Liška
2021-07-13 14:54                               ` Tamar Christina
2021-08-09 13:29                                 ` Martin Liška
2021-06-02 20:41       ` GCC documentation: porting " Martin Sebor
2021-06-03 10:56         ` Martin Liška
2021-06-04 15:10           ` Martin Sebor
2021-06-10  9:07             ` Martin Liška
2021-06-10 13:18               ` Martin Liška
2021-06-10 23:48                 ` Martin Sebor
2021-06-11 14:34                   ` Martin Liška
2021-06-04  7:55     ` RFC: Sphinx for GCC documentation Tobias Burnus
2021-06-04 14:24       ` Koning, Paul
2021-06-07 13:30         ` Martin Liška
2021-06-07 21:26           ` Bernhard Reutner-Fischer
2021-06-08  7:43             ` Martin Liška
2021-06-07 13:28       ` Martin Liška
2021-06-07 14:19         ` Tobias Burnus
2021-06-10 10:32           ` Martin Liška

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=mpto8bgud44.fsf@arm.com \
    --to=richard.sandiford@arm.com \
    --cc=eliz@gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gcc@gcc.gnu.org \
    --cc=hp@bitrange.com \
    --cc=joseph@codesourcery.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).