From: "Jean-Noël AVILA" <jn.avila@free.fr>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Jean-Noël Avila via GitGitGadget" <gitgitgadget@gmail.com>,
git@vger.kernel.org
Subject: Re: [PATCH 1/3] doc: git-rev-parse: enforce command-line description syntax
Date: Wed, 21 Feb 2024 22:52:06 +0100 [thread overview]
Message-ID: <5764785.DvuYhMxLoT@cayenne> (raw)
In-Reply-To: <xmqqfrxlpvv1.fsf@gitster.g>
On Wednesday, 21 February 2024 18:31:30 CET Junio C Hamano wrote:
> Jean-Noël Avila <jn.avila@free.fr> writes:
>
> >>> ---short[=length]::
> >>> +--short[=<length>]::
> >>> Same as `--verify` but shortens the object name to a unique
> >>> prefix with at least `length` characters. The minimum length
> >> This same comment applies throughout this patch, but in other places
> >> when we use <placeholder> in the option argument description, don't
> >> we use the same <placeholder> in text as well? I am wondering if
> >> the `length` (typeset in fixed-width) should become <length>. What
> >> do other recent[*] documentation pages commonly do?
> >
> > This is another part of the inconsistences in documentation that I'd
> > like to tackle (hopefully, not in another life).
> >
> > Using angle brackets for placeholders everywhere they appear is a
> > visual link to the preceding syntax description, but may feel a bit
> > heavy on some cases. Anyway, I'm all for applying the rule everywhere,
> > for the sake of consistency.
>
> I agree that if <placeholder> is not an appropriate way to spell
> them in the explanation text, we would want to change them
> consistently everywhere, and until then, using the angle-bracketted
> <placeholder> that is common would be better. The text will be
> modified again when we decide to switch from <placeholder> to
> something else, so updating them now may be a wasted effort, but (1)
> we may decide that <placeholder> is good enough after all, or (2) it
> may make it easier to mechanically identify words whose mark-up
> should be converted if we consistently use <placeholder> now, even
> if we know it won't be the final mark-up.
>
> So I am inclined to say that we should first do `length` -> <length>
> in the body text in the short term. But I also think we should
> *not* do so as part of this patch, whose focus is how the option
> enumeration header should mark up the option arguments.
>
> > Backticks and single quotes are used indistinctively (by the way,
> > asciidoctor does not process single quotes as markup) and are not used
> > everywhere they should. Using backticks is also a good hint for
> > translators to mean "verbatim, do not translate". Obviously, the
> > placeholders ask for translation, so the backtick rule should not
> > apply to them, even if another formating would be welcome :
> > _<placeholder>_ for instance?
>
> Yes. The way AsciiDoc renders (at least HTML) an unadorned <placeholder>
> is not so great.
>
> In "git-add.html" manual page, we see these examples. The first one
> (unadorned) does not make the placeholder word stand out enough; the
> second one that does `<file>` makes it stand out better, but as you
> said, the `verbatim` mark-up is semantically wrong.
>
> https://git.github.io/htmldocs/git-add.html#:~:text=For%20more%20details%20about%20the%20%3Cpathspec%3E%20syntax
>
> https://git.github.io/htmldocs/git-add.html#:~:text=Pathspec%20is%20passed%20in%20%3Cfile%3E%20instead%20of%20commandline%20args.%20If%20%3Cfile%3E%20is%20exactly%20%2D%20then%20standard%20input%20is%20used.%20Pathspec
>
> The last part of the Documentation/CodingGuidelines document talks
> about how to mark up placeholders but it does not go beyond saying
> that they are written as <hyphen-in-between-words-in-angle-braket>.
> Whatever mark-up rule we decide to use, we should document it there.
>
> Thanks.
>
>
>
>
Hi,
I just saw that you pushed this series to 'next'. That's embarrassing because I missed other spots in the file were the formating was not correct. I was also preparing the changes of placeholders in paragraphs as suggested.
Should I prepare another PR?
Thanks
next prev parent reply other threads:[~2024-02-21 21:52 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-20 22:32 [PATCH 0/3] Doc placeholders Jean-Noël Avila via GitGitGadget
2024-02-20 22:32 ` [PATCH 1/3] doc: git-rev-parse: enforce command-line description syntax Jean-Noël Avila via GitGitGadget
2024-02-20 22:57 ` Junio C Hamano
2024-02-21 7:41 ` Jean-Noël Avila
2024-02-21 17:31 ` Junio C Hamano
2024-02-21 21:52 ` Jean-Noël AVILA [this message]
2024-02-21 22:36 ` Junio C Hamano
2024-02-22 9:07 ` Jean-Noël AVILA
2024-02-22 16:38 ` Junio C Hamano
2024-02-24 18:28 ` Jean-Noël AVILA
2024-02-20 22:32 ` [PATCH 2/3] doc: git-clone fix missing placeholder end carret Jean-Noël Avila via GitGitGadget
2024-02-20 22:39 ` Eric Sunshine
2024-02-20 23:01 ` Junio C Hamano
2024-02-20 22:32 ` [PATCH 3/3] doc: add some missing sentence dots Jean-Noël Avila via GitGitGadget
2024-02-20 22:50 ` Junio C Hamano
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=5764785.DvuYhMxLoT@cayenne \
--to=jn.avila@free.fr \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=gitster@pobox.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 NNTP newsgroup(s).