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

Re: [PATCH] Documentation: don't link to example mail addresses

From
Jeff King <peff@peff.net>
Date
Dec 16, 2012, 12:04 UTC
Message-ID
<20121216120405.GA14320@sigill.intra.peff.net>
In-Reply-To
<20121215182408.GD2725@river.lan>
On Sat, Dec 15, 2012 at 06:24:09PM +0000, John Keeping wrote:
Show 11 quoted lines
> > I think I'd just render them monospace everywhere. We are very
> > inconsistent about which form of quotes we use in the documentation (I
> > think because most of the developers read the source directly and not
> > the rendered asciidoc). And then we don't have to worry about the "$$"
> > construct (and IMHO it makes the source much more readable, and marking
> > the address as a literal looks good in the output, too).
> 
> I agree that the source is more readable as monospaced, but I think we
> need to keep the quotes around the text in git-tag(1) and probably
> git-fast-import(1) so that it is differentiated from the surrounding
> text in the man page output.

Hmm, good point. I use MAN_BOLD_LITERAL, which serves that purpose, but I guess not everyone does (and it is not the default; I wonder if it should be). But if MAN_BOLD_LITERAL is not in use, then `` literals have zero typographical impact in the manpages.

So maybe we do need to do something else. I was just hoping we could get away with something more readable in the source.

By my reading of the asciidoc user guide, the mechanism that is hurting us is that mailto is an inline macro, and that foo@bar automatically triggers that inline macro. Furthermore, the right way to suppress expansion of macros is with a backslash escape. Doing this:

diff --git a/Documentation/git-fast-import.txt b/Documentation/git-fast-import.txt
index d1844ea..68bca1a 100644
--- a/Documentation/git-fast-import.txt
+++ b/Documentation/git-fast-import.txt
@@ -427,7 +427,7 @@ Here `<name>` is the person's display name (for example
 
 Here `<name>` is the person's display name (for example
 ``Com M Itter'') and `<email>` is the person's email address
-(``cm@example.com'').  `LT` and `GT` are the literal less-than (\x3c)
+(``\cm@example.com'').  `LT` and `GT` are the literal less-than (\x3c)
 and greater-than (\x3e) symbols.  These are required to delimit
 the email address from the other fields in the line.  Note that
 `<name>` and `<email>` are free-form and may contain any sequence

seems to produce the output we want. I think it's a little less ugly
than the "$$" quoting, but not by much. No clue if one is accepted by
more asciidoc versions or not.

-Peff
Previous: John KeepingNext: John Keeping
Message 5 of 12 in “Documentation: don't link to example mail addresses”
  1. Documentation: don't link to example mail addressesJohn Keeping, Dec 15, 2012
  2. Jeff KingDec 15, 2012
  3. Junio C HamanoDec 15, 2012
  4. John KeepingDec 15, 2012
  5. Jeff KingDec 16, 2012
  6. Documentation: don't link to example mail addressesJohn Keeping, Dec 16, 2012
  7. Junio C HamanoDec 16, 2012
  8. Junio C HamanoDec 17, 2012
  9. Jeff KingDec 17, 2012
  10. Junio C HamanoDec 17, 2012
  11. Junio C HamanoDec 17, 2012
  12. John KeepingDec 17, 2012

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.