git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC] formatting macro

From
Johannes Sixt <j6t@kdbg.org>
Date
Aug 12, 2024, 06:35 UTC
Message-ID
<f44c253d-9b37-451d-902d-486adb8e3d72@kdbg.org>
In-Reply-To
<4617471.LvFx2qVVIh@cayenne>
Am 07.08.24 um 22:43 schrieb Jean-Noël AVILA:
Show 40 quoted lines
> On Monday, 5 August 2024 18:08:07 CEST Junio C Hamano wrote:
>> Johannes Sixt <j6t@kdbg.org> writes:
>>
>>> I've a strong aversion to the formatting that this series applies,
>>> because it introduces many (IMHO) unnecessary punctuation that
>>> vandalizes the perfectly readable plain text. And this hunk now shows
>>> where it goes too far. These lines under the new [synopsis] header just
>>> aren't syopsis; they are comamnd output. The updated version abuses a
>>> semantic token to achieve syntactic highlighting.
>>>
>>> To me this series looks too much like "we must adapt to the tool" when
>>> the correct stance should be "the tool must adapt to us". If the tool
>>> (one of asciidoc and asciidoctor, I presume) does not cooperate well
>>> with out documents, then it is the tool that must be changed, not our
>>> documents.
>>>
>>> I understand that some compromises are needed, but with this extent of
>>> changes we give in to a sub-par tool too far.
>>
>> Thanks for placing this into words a lot better than how I could
>> have done.  I share the same feeling.
>>
> 
> I'm working on a form of macro that would work almost the same way as the 
> synopsis paragraph. You would have some markup, but it would be surrounding 
> the text to typeset: 
> 
> s:["--ignore-matching-lines=<regex>"]
> 
> In this snippet the macro part (which is recognized by a regex) is  s:[ ]
> The inside part is managed the same. If you need additional markup, it is 
> possible:
> 
> s:["<commit1>`...`<commit2>"] to have the three dots rendered as <code>, 
> because they are part of the tokens.
> 
> Square brackets are possible inside the double-quotes:
> s:["--ignore-submodules[=<when>]"]
> 
> Is this something that wouldn't repel you?
You argued elsewhere in this thread:
>  * The fact that the source of the pages should be "perfectly readable" is a 
> moot argument. Fair enough, it is not the objective to make it impossible to 
> understand, but in the end, this is not what is consumed: these pages are 
> compiled into other formats where the markup has been translated into styling. 

I buy this argument, in particular, since not even I read the plain text files, but use the rendered version.

I would like tone down my harsh opposition to mild opposition. IMO, it should still be easy to *write* the documentation. It should not be necessary that authors remember to use macros all over the place.

And I still think that we should not introduce macros just to please all renderers. Let's just pick the one renderer that can do the job best. If it means that some distribution cannot render the documentation perfectly themselves (Debian? I don't know), they can always use the pre-rendered version that Junio kindly produces.

-- Hannes
Previous: Jean-Noël AVILANext: Junio C Hamano
Message 12 of 65 in “doc: git diff reformatting”
  1. 0/5 doc: git diff reformattingJean-Noël Avila via GitGitGadget, Aug 4, 2024
  2. 1/5 doc: git-diff: apply new documentation guidelinesJean-Noël Avila via GitGitGadget, Aug 4, 2024
  3. Patrick SteinhardtAug 5, 2024
  4. Jean-Noël AVILAAug 5, 2024
  5. Patrick SteinhardtAug 6, 2024
  6. 3/5 doc: git-diff: apply format changes to diff-formatJean-Noël Avila via GitGitGadget, Aug 4, 2024
  7. 2/5 doc: git-diff: apply format changes to diff-optionsJean-Noël Avila via GitGitGadget, Aug 4, 2024
  8. 4/5 doc: git-diff: apply format changes to diff-generate-patchJean-Noël Avila via GitGitGadget, Aug 4, 2024
  9. Johannes SixtAug 5, 2024
  10. Junio C HamanoAug 5, 2024
  11. Jean-Noël AVILAAug 7, 2024
  12. Johannes SixtAug 12, 2024
  13. Junio C HamanoAug 12, 2024
  14. Jean-Noël AVILAAug 13, 2024
  15. Jean-Noël AVILAAug 5, 2024
  16. 5/5 doc: git-diff: apply format changes to config partJean-Noël Avila via GitGitGadget, Aug 4, 2024
  17. 0/5 doc: git diff reformattingJean-Noël Avila via GitGitGadget, Nov 11, 2024
  18. 1/5 doc: git-diff: apply new documentation guidelinesJean-Noël Avila via GitGitGadget, Nov 11, 2024
  19. Junio C HamanoNov 12, 2024
  20. Jean-Noël AvilaNov 12, 2024
  21. Junio C HamanoNov 12, 2024
  22. Johannes SixtNov 12, 2024
  23. Junio C HamanoNov 12, 2024
  24. Johannes SixtNov 13, 2024
  25. Jean-Noël AvilaNov 13, 2024
  26. 2/5 doc: git-diff: apply format changes to diff-optionsJean-Noël Avila via GitGitGadget, Nov 11, 2024
  27. Junio C HamanoNov 12, 2024
  28. Jean-Noël AvilaNov 12, 2024
  29. Junio C HamanoNov 12, 2024
  30. 4/5 doc: git-diff: apply format changes to diff-generate-patchJean-Noël Avila via GitGitGadget, Nov 11, 2024
  31. 3/5 doc: git-diff: apply format changes to diff-formatJean-Noël Avila via GitGitGadget, Nov 11, 2024
  32. Johannes SixtNov 12, 2024
  33. Junio C HamanoNov 12, 2024
  34. Johannes SixtNov 13, 2024
  35. Jean-Noël AvilaNov 13, 2024
  36. 5/5 doc: git-diff: apply format changes to config partJean-Noël Avila via GitGitGadget, Nov 11, 2024
  37. Johannes SixtNov 12, 2024
  38. Jean-Noël AvilaNov 13, 2024
  39. 0/5 doc: git diff reformattingJean-Noël Avila via GitGitGadget, Nov 16, 2024
  40. 1/5 doc: git-diff: apply new documentation guidelinesJean-Noël Avila via GitGitGadget, Nov 16, 2024
  41. Johannes SixtNov 17, 2024
  42. Jean-Noël AVILANov 17, 2024
  43. Junio C HamanoNov 18, 2024
  44. Junio C HamanoNov 18, 2024
  45. 3/5 doc: git-diff: apply format changes to diff-formatJean-Noël Avila via GitGitGadget, Nov 16, 2024
  46. 2/5 doc: git-diff: apply format changes to diff-optionsJean-Noël Avila via GitGitGadget, Nov 16, 2024
  47. 4/5 doc: git-diff: apply format changes to diff-generate-patchJean-Noël Avila via GitGitGadget, Nov 16, 2024
  48. 5/5 doc: git-diff: apply format changes to config partJean-Noël Avila via GitGitGadget, Nov 16, 2024
  49. 0/5 doc: git diff reformattingJean-Noël Avila via GitGitGadget, Nov 18, 2024
  50. 1/5 doc: git-diff: apply new documentation guidelinesJean-Noël Avila via GitGitGadget, Nov 18, 2024
  51. SZEDER GáborMar 31, 2025
  52. doc: fix asciidoctor synopsis processing of triple-dotsJean-Noël Avila, Mar 31, 2025
  53. SZEDER GáborMar 31, 2025
  54. Jean-Noël AVILAMar 31, 2025
  55. doc: fix asciidoctor synopsis processing of triple-dotsJean-Noël Avila, Apr 1, 2025
  56. Junio C HamanoApr 1, 2025
  57. Jean-Noël AvilaApr 2, 2025
  58. Junio C HamanoApr 7, 2025
  59. 3/5 doc: git-diff: apply format changes to diff-formatJean-Noël Avila via GitGitGadget, Nov 18, 2024
  60. 4/5 doc: git-diff: apply format changes to diff-generate-patchJean-Noël Avila via GitGitGadget, Nov 18, 2024
  61. 2/5 doc: git-diff: apply format changes to diff-optionsJean-Noël Avila via GitGitGadget, Nov 18, 2024
  62. 5/5 doc: git-diff: apply format changes to config partJean-Noël Avila via GitGitGadget, Nov 18, 2024
  63. Junio C HamanoNov 26, 2024
  64. Johannes SixtNov 26, 2024
  65. Junio C HamanoNov 26, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.