Bug 266881 - AsciiDoctor Primer: include more about macros, and obscure markup such as [.filename]#/path/to/file#
Summary: AsciiDoctor Primer: include more about macros, and obscure markup such as [.f...
Status: Open
Alias: None
Product: Documentation
Classification: Unclassified
Component: Books & Articles (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Sergio Carlavilla Delgado
URL: https://github.com/freebsd/freebsd-do...
Keywords: needs-patch, needs-qa
Depends on:
Blocks:
 
Reported: 2022-10-07 07:03 UTC by Graham Perrin
Modified: 2023-08-26 07:16 UTC (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Graham Perrin freebsd_committer freebsd_triage 2022-10-07 07:03:07 UTC
Can the primer gain a list of available macros? 

Also, for each one: 

* context (not too complex)

* at least one example. 

Thanks


Background
==========

<https://docs.freebsd.org/en/books/fdp-primer/asciidoctor-primer/#asciidoctor-links> comprises two subsections: 

* External links
* Internal link

– no hint of how to form the special link to a page for a port. 

For discovery, for an example, I browsed source code for part of the FreeBSD Handbook. 

Then, thanks to Pau Amma, I found my way to this: 

<https://github.com/freebsd/freebsd-doc/blob/main/shared/lib/PackagesMacro/extension.rb>

– for PackagesMacro, which, if I understand correctly, relates to 
  the macro named: 

    package

Example use: 

    package:ports-mgmt/pkg[]

– current result (cgit): 

    <https://cgit.freebsd.org/ports/tree/ports-mgmt/pkg/pkg-descr>

– a three-word description.
Comment 1 Graham Perrin freebsd_committer freebsd_triage 2022-10-08 05:06:09 UTC
    man

Example use: 

    man:config[8]

<https://github.com/freebsd/freebsd-doc/blob/main/shared/lib/ManPageMacro/extension.rb>


----

More macros at/around <https://github.com/freebsd/freebsd-doc/tree/main/shared/lib> …
Comment 2 Fernando Apesteguía freebsd_committer freebsd_triage 2022-10-09 15:54:59 UTC
^Triage: reporter is committer, assign accordingly.
Comment 3 Graham Perrin freebsd_committer freebsd_triage 2023-07-10 04:32:24 UTC
Re: <https://github.com/freebsd/freebsd-doc/pull/202#discussion_r1257442111> and the absence of this from the Primer: 

.filename

Where can I find a list of such things? 

Is there markup for an inline command?
Comment 4 Graham Perrin freebsd_committer freebsd_triage 2023-07-10 04:48:42 UTC
(In reply to Graham Perrin from comment #3)

> … Is there markup for an inline command?

I guess not: 

% rg --count \\[\\.filename\]\# /usr/doc | less
% rg --count \\[\\.command\]\# /usr/doc
% rg --count \\[\\.cmd\]\# /usr/doc
% rg --count \\[\\.exe /usr/doc
%
Comment 5 Lorenzo Salvadore freebsd_committer freebsd_triage 2023-07-16 12:15:38 UTC
Sorry grahamperrin@, but I do not know the answers to your questions. But I believe that carlavilla@ (that I am adding to CC) might be helpful.

In case something such as .filename is undocumented, it would be great to make a patch and finally document it somewhere.
Comment 6 Graham Perrin freebsd_committer freebsd_triage 2023-08-19 13:56:26 UTC
(In reply to Graham Perrin from comment #1)

<https://github.com/freebsd/freebsd-doc/pull/248/commits/3b927ef5f56fd57fd6317c0e677d686c0bb3a533> relates.
Comment 7 Fernando Apesteguía freebsd_committer freebsd_triage 2023-08-21 06:24:05 UTC
^Triage: Reporter is committer, assign accordingly

Any committer may commit to any repository with an accepted review from any committer with existing access to that repository.

Committers may obtain review via a Differential in Phabricator, adding the "Contributor Reviewers ($Repository)" group as a Reviewer, reaching out to other committers; directly or via mailing lists, or setting the attachment flag to: maintainer-approval ? <person-youd-like-to-review>
Comment 8 Graham Perrin 2023-08-21 07:34:27 UTC
(In reply to Fernando Apesteguía from comment #7)

I await a response to a recent discreet enquiry about handing back my commit bit. It's a busy time, so be patient whilst things are formalised.

In the meantime: 

* please refrain from reassigning things – without question – 
  to my @freebsd.org identity.
Comment 9 Fernando Apesteguía freebsd_committer freebsd_triage 2023-08-21 07:43:00 UTC
(In reply to Graham Perrin ◐ from comment #8)

>* please refrain from reassigning things – without question – 
>  to my @freebsd.org identity.

I'll do what I need to do from a point of view of triage. Since you did not provide *any* reasons as to why you removed yourself from the assignee, I didn't really sea a reason to ask you if I could assign it to you.

Just so you know, I do this for *every* developer. None have complained.
Comment 10 Graham Perrin 2023-08-21 09:07:23 UTC
Off-topic from Asciidoctor, but to avoid any future confusion: 

> developer

When I became a committer, the "few words about me" made unmistakably clear that (contrary to misclassifications) I am _not_ a developer. 

Beyond that, I prefer to not discuss in Bugzilla; I should repeat the word 'discreet'.
Comment 11 Mark Linimon freebsd_committer freebsd_triage 2023-08-22 03:30:51 UTC
(In reply to Fernando Apesteguía from comment #9)

With bugmeister hat, I have to say that I am very disappointed with this response.

I'm sorry that I did not catch up on this PR earlier, but I am traveling.

I would like to continue this discussion on bugmeister@.

mcl
Comment 12 Fernando Apesteguía freebsd_committer freebsd_triage 2023-08-22 06:00:53 UTC
Please Graham,

Accept my deepest public apologies.

I will never assign you another PR.

I have already reset the maintainer for the PRs I wrongly assign to you a couple of days ago.

Again, please accept my apologies.
Comment 13 Graham Perrin 2023-08-22 07:14:56 UTC
(In reply to Fernando Apesteguía from comment #12)

Gosh, thank you. I'm sorry that I put you in an awkward position, it wasn't my intention.

An apology is quite unexpected, in that your ^Triage was entirely consistent with e.g. workflow-oriented <https://wiki.freebsd.org/Bugzilla/TriageTemplates#reporter-is-nonspecific-committer>. 

Unexpected, but it's no less valuable an apology. Gratefully received, thank you, Fernando.

Equally to Mark: I'm sorry that a situation led to you stepping in. I have not yet had time to respond to the private email. Maybe later today (I must leave the house now, rushing, E&OE). 

----

Now, If there's no procedural requirement for this bug report to remain assigned to Bugmeister, I'll be happy for either of you to reassign to doc@

Thanks
Comment 14 Mark Linimon freebsd_committer freebsd_triage 2023-08-22 07:19:05 UTC
Thank you both.