Skip to content

Conversation

@charles2910
Copy link
Contributor

C is a non-portable font. Use CR instead which is a "Regular constant width font".

This was spotted by lintian tool in the Debian packaging and can be reproduced with LC_ALL=C.UTF-8 MANROFFSEQ='' MANWIDTH=80 man --warnings -E UTF-8 -l -Tutf8 -Z /usr/share/man/man5/neomuttrc.5 >/dev/null. Example:

[...]
W: neomutt: groff-message troff:<standard input>:9012: warning: cannot select font 'C' [usr/share/man/man5/neomuttrc.5.gz:217]
W: neomutt: groff-message troff:<standard input>:9014: warning: cannot select font 'C' [usr/share/man/man5/neomuttrc.5.gz:218]
W: neomutt: groff-message troff:<standard input>:9017: warning: cannot select font 'C' [usr/share/man/man5/neomuttrc.5.gz:219]
[...]

As far as I was able to read, the only difference it could cause is when rendering HTML/PDF/richer media. For man which prints to the terminal - which already uses monospace fonts - it's just a no-op.

More info available at:

@charles2910 charles2910 requested a review from a team as a code owner December 28, 2024 18:40
@flatcap
Copy link
Member

flatcap commented Dec 30, 2024

@alejandro-colomar
As the man-page guru, would you like to comment on this?

docs/config.c Outdated
** .pp
** The default file in which to save aliases created by the
** \fC$<create-alias>\fP function. Entries added to this file are
** \f[CR]$<create-alias>\fP function. Entries added to this file are
Copy link
Member

@alejandro-colomar alejandro-colomar Dec 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the Linux man-pages project we completely avoid both \fC and \f[CR]. We use either italics or bold.

Rationale: most of the time, the manual page is read in the terminal, where everything is monospaced, so marking some identifier as Courier (monospaced) doesn't help the reader at all. It helps on the PDF, but few people read manual pages as PDF these days.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@flatcap do you have any opinions on whether to keep the CR or change to something else? Maybe bold and italic? What do you use on kernel's documentation in this case @alejandro-colomar?

I have no strong opinions on this one and used CR to keep the same behaviour as before but in a compatible way (both troff and groff support it). After all, I think this predates neomutt by a lot (6cd98f2) so I think it was mainly not touched for a while and just existed on the codebase.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

most of the time, the manual page is read in the terminal, where everything is monospaced

Oh yeah :-)

do you have any opinions on whether to keep the CR or change to something else?

I think bold would be a reasonable choice for highlighting keywords, functions, etc.
(but I don't feel too strongly about it).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there are actually rules for that: https://man7.org/linux/man-pages/man7/groff_man_style.7.html, section "Font style macros"

Copy link
Member

@alejandro-colomar alejandro-colomar Dec 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, we have style rules for this in groff_man_style(7). Here's the rules that @ossilator mentions:

       .B [text]
              Set text in bold.  If no argument is given, a one‐line input trap
              is planted; text on the next line, which can be further formatted
              with a macro, is set in bold.

              Use  bold  for  literal portions of syntax synopses, for command‐
              line options in running text, and for  literals  that  are  major
              topics  of  the  subject under discussion; for example, this page
              uses bold for macro, string, and register names.  In  an  .EX/.EE
              example  of  interactive  I/O (such as a shell session), set only
              user input in bold.

       .I [text]
              Set text in an italic or oblique face.  If no argument is  given,
              a  one‐line  input  trap is planted; text on the next line, which
              can be further formatted with a macro, is set  in  an  italic  or
              oblique face.

              Use  italics  for file and path names, for environment variables,
              for C data types, for enumeration or preprocessor constants in C,
              for variant (user‐replaceable) portions of syntax  synopses,  for
              the  first  occurrence (only) of a technical concept being intro‐
              duced, for names of journals and of literary works longer than an
              article, and anywhere a parameter requiring  replacement  by  the
              user  is  encountered.   An  exception involves variant text in a
              context already typeset in italics, such as file  or  path  names
              with replaceable components; in such cases, follow the convention
              of  mathematical typography: set the file or path name in italics
              as usual but use roman for the variant part (see .IR and .RI  be‐
              low),  and  italics again in running roman text when referring to
              the variant material.

A rough TL;DR would be: function and variable names and placeholders in italics, and literals in bold. Inline examples of commands, expressions, etc., in italics. Use of bold should be minimal (think of it like uppercase; abusing it is considered rude).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heh! Have a lovely new year! If your thesis allows... :-)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inline examples of commands, expressions, etc., in italics.

I don't think that's part of the advice in groff_man_style(7).

     Use italics for emphasis rarely, and bold almost never.  Brief
     specimens of literal text, such as article titles, mentions of
     individual characters or short strings, and (sub)section headings
     in man pages, are suitable objects for quotation; see the \(lq,
     \(rq, \(oq, and \(cq escape sequences in subsection “Portability”
     below.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inline examples of commands, expressions, etc., in italics.

I don't think that's part of the advice in groff_man_style(7).

     Use italics for emphasis rarely, and bold almost never.  Brief
     specimens of literal text, such as article titles, mentions of
     individual characters or short strings, and (sub)section headings
     in man pages, are suitable objects for quotation; see the \(lq,
     \(rq, \(oq, and \(cq escape sequences in subsection “Portability”
     below.

Sorry, that part is from man-pages(7).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, italics it is.

@flatcap I've been looking at this right now and realized a small problem. We generate all html documentation from these using docs/makedoc.c. If we change \fC to \fI, \fB or else, we are loosing the code blocks on html. I think you generate the website documentation the same way right? Like the reference, all code blocks would become italics or bold.

So I'm a bit in doubt about loosing the code blocks on html in order to make the manpages compliant to groff_man_style(7). Using \fCR would keep things as is.

Right now I see the two options above, maybe you guys can give a better and different one.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uhm... I have an idea starting to form on my head - to be continued tomorrow

(apparently all I needed was to stop typing and go to shower)

C is a non-portable font which can be ignored depending on roff's
implementation. We are changing it to italic or bold depending on the
case, following Linux's groff_man_style(7).

Also, let's take the opportuninty to remove any code associated to it
from makedoc.c.
** .pp
** The default \fC"alpha"\fP setting of $$browser_sort uses
** locale-based sorting (using \fCstrcoll(3)\fP), which ignores some
** The default \fI"alpha"\fP setting of $$browser_sort uses
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since "alpha" is a literal, I'd make it bold.

** .pp
** This variable controls how some hooks are interpreted if their pattern is a
** plain string or a regex. i.e. they don't contain a pattern, like \fC~f\fP
** plain string or a regex. i.e. they don't contain a pattern, like \fI~f\fP
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a literal, so I'd use bold, I think. It's not a clear case, I think, though.

Copy link

@g-branden-robinson g-branden-robinson Jan 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a bit of off-topic English style advice...

  1. The Latin abbreviation "i.e." should be followed by a comma, since id est roughly means "that is".
  2. The Latin abbreviation remains subject to the capitalization rules of English sentences, thus "I.e.,".
  3. I would avoid the use of Latin abbreviations except in a conventional scholarly context anyway. In man pages I favor English words over Latin abbreviations. This also avoids the common embarrassment of using "cf." incorrectly to mean "see", when it abbreviates Latin confere, which roughly means "compare" (or, more precisely, "contrast"; it is used to draw the reader's attention to a distinction or difference).

** \fBNote:\fP when using $$sendmail for delivery, you should not enable
** this unless you are either using Sendmail 8.8.x or greater or a MTA
** providing a \fCsendmail(1)\fP-compatible interface supporting the \fC-N\fP option
** providing a \fIsendmail(1)\fP-compatible interface supporting the \fI-N\fP option
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For command-line flags, you should use bold.

** \fBNote:\fP when using $$sendmail for delivery, you should not enable
** this unless you are either using Sendmail 8.8.x or greater or a MTA
** providing a \fCsendmail(1)\fP-compatible interface supporting the \fC-R\fP option
** providing a \fIsendmail(1)\fP-compatible interface supporting the \fI-R\fP option
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cmd flag bold

Comment on lines -1529 to +1530
** Controls the decoding of complex MIME messages into \fCtext/plain\fP when
** Controls the decoding of complex MIME messages into \fItext/plain\fP when
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@g-branden-robinson What would you use here? Bold, italics, or roman? I don't know.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Holy blap, I've been blitzed.

Uh, okay, I'll work through these callouts one by one.

That, I would quote. We really need to stop fearing quotation in our man(7) documents.

** Controls the decoding of complex MIME messages into \[lq]text/plain\[rq] when

Copy link
Member

@alejandro-colomar alejandro-colomar Jan 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Holy blap, I've been blitzed.

:-)

Uh, okay, I'll work through these callouts one by one.

That, I would quote. We really need to stop fearing quotation in our man(7) documents.

** Controls the decoding of complex MIME messages into \[lq]text/plain\[rq] when

Hmmm, true. I now think I have seen some of those in the Linux man-pages project.

However, since this string is usually quoted in code, I might use vertical quotes, as if it was a string. What do you think?

Thanks!

Copy link

@g-branden-robinson g-branden-robinson Jan 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd only use neutral quotes if they were a necessary part of the example. I would not use them to perform quotation itself in the man page itself.

YES: Consider the declaration \[lq]const char foo[] = "bar";\[rq] next.
NO: We wanted "bar" to be null-terminated.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd only use neutral quotes if they were a necessary part of the example. I would not use them to perform quotation itself in the man page itself.

YES: Consider the declaration \[lq]const char foo[] = "bar";\[rq] next. NO: We wanted "foobar" to be null-terminated.

Hmmm, I disagree here. "foobar" is a C string, and I think that writing it as it would be written in a C program, with vertical quotes, aids readability.

Copy link

@g-branden-robinson g-branden-robinson Jan 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion, you are then implying the C string literal \"foobar\" (as I would spell it in source code; the object in memory of course has no backslashes).

My view is that C syntax and English syntax differ greatly and should not be intermixed.

Moreover, in man pages we often have occasion to discuss programming or configuration language syntaxes that are not C. Aggressively using C-correct utterances in those contexts can cause confusion, or outright error on the part of the user.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm not sure what you're arguing here at this point. :}

i'd write:

Consider the declaration \[lq]const char foo[] = \[dq]bar\[dq];\[rq] next.
We wanted \[lq]bar\[rq] to be null-terminated.

it is my understanding that literal quotes should never be used, as their rendering varies in undesirable ways.

quotes aside, inlining a whole line of c code is a bad idea; i'd write it like that instead:

.RS 8
.nf
const char foo[] = \[dq]bar\[dq];
.fi
.RE
.IP

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm not sure what you're arguing here at this point. :}

i'd write:

Consider the declaration [lq]const char foo[] = [dq]bar[dq];[rq] next.
We wanted [lq]bar[rq] to be null-terminated.

it is my understanding that literal quotes should never be used,
as their rendering varies in undesirable ways.

"Never" is, technically, too strong, but pretty close. There are two different problems.

  • " is interpreted as delimiting a macro argument, but only when used in a macro call. It's "safe" on text lines, but if someone inattentively grabs a phrase from a text line and stuffs it into a macro call, they likely will not get the formatted output they expect. Unfortunately, \[dq] (or even \(dq) isn't perfectly portable; see below.

  • Single quotes have gotten progressively more problematic.

    • The grave accent (I can't get this Markdown to format it inline correctly) and apostrophe/neutral single quote ' traditionally were perfectly reliable ways of getting directional single quotes, if they existed at all on the output device. When the Bell Labs CSRC developed nroff and troff, these characters looked on their Teletype Corporation Model 37s much as depicted in ANSI X3.4-1977.
    • In the 1980s, ISO 8859 disambiguated the apostrophe from the acute accent, rendering the former neutral (vertical) in orientation, which also removed it from consideration as a candidate directional single quotation mark.
    • Starting about 15 years ago, it became fashionable to have one's groff man package remap the grave accent and apostrophe to "themselves". That created a problem.

As a forthcoming commit of mine to groff_man_style(7) puts it:

       Historically, man pages used ` and ' exclusively for directional
       single quotation marks.  However, in recent years, some
       distributors of groff have chosen to override the meanings of
       these characters in man pages, remapping them to their Unicode
       Basic Latin code points.  Unfortunately, ` and ' are the only
       reliable means of obtaining directional single quotation marks in
       AT&T troff; in that implementation, often no special character
       escape sequences exist to obtain them.  Further, in AT&T troff,
       the glyph repertoire, like the set of supported font names, is
       device‐specific.  To achieve quotation portably in man pages
       rendered both by AT&T and more modern troffs, consider adding a
       preamble to your page after the .TH call as follows.

              .ie \n(.g \{\
              .  ds oq \(oq
              .  ds cq \(cq
              .\}
              .el \{\
              .  ds oq `
              .  ds cq '
              .\}

       You must then use the \* escape sequence to interpolate the
       quotation mark strings.

              The command
              .RB \*(oq "while ! git pull; do sleep 10; done" \*(cq
              retries an update from our repository until it succeeds.

       If this procedure seems complex, petition your distributor to
       revert their remapping of the ` and ' characters.

Since old troffs don't reliably support all of the special character escape sequences for obtaining quotation marks that groff supports, if you need portability to those formatters, you can't say "never".

quotes aside, inlining a whole line of c code is a bad idea; i'd write it like that instead:

.RS 8
.nf
const char foo[] = [dq]bar[dq];
.fi
.RE
.IP

I won't argue with your suggestion to display such an example instead of inlining it. But I would:

  1. ...not supply arguments to the RS request unless necessary. The relative inset amount is configurable at formatting time via the IN register, and the user's selection should be respected. Where necessary, multiple RS insets can be nested.
  2. ...use EX and EE inboard of the nf and fi requests if you need portability to formatters that don't support EX and EE, and instead of the requests if you don't. This gets you a monospaced font family (Courier) on typesetters, which in turn makes ASCII art possible on those devices. Traditional troffs silently ignore calls of macro names they don't recognize, groff supports them, and so does mandoc since its 1.12.2 release over 10 years ago.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion, you are then implying the C string literal \"foobar\" (as I would spell it in source code; the object in memory of course has no backslashes).

My view is that C syntax and English syntax differ greatly and should not be intermixed.

Moreover, in man pages we often have occasion to discuss programming or configuration language syntaxes that are not C. Aggressively using C-correct utterances in those contexts can cause confusion, or outright error on the part of the user.

Hmmmm, maybe it depends on the context. I don't fully agree, but don't strongly disagree either.

Comment on lines -1618 to +1619
** should set it to "\fC.*\fP".
** should set it to "\fI.*\fP".
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would consider this a literal, so bold, I think. Also, since the config should include the quotes, I'd also make them bold.

Comment on lines -2529 to +2530
** This can also be set using the \fC-m\fP command-line option.
** This can also be set using the \fI-m\fP command-line option.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cmd flag bold

** This is the string displayed in the "attachment" menu for
** attachments of type \fCmessage/rfc822\fP. For a full listing of defined
** \fCprintf(3)\fP-like sequences see the section on $$index_format.
** attachments of type \fImessage/rfc822\fP. For a full listing of defined
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar question, @g-branden-robinson.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quotation marks again.

Comment on lines -2600 to +2603
** has an ASCII value of \fC0xf8\fP, then this is treated as if the user had
** has an ASCII value of \fI0xf8\fP, then this is treated as if the user had
** pressed Esc then "x". This is because the result of removing the
** high bit from \fC0xf8\fP is \fC0x78\fP, which is the ASCII character
** high bit from \fI0xf8\fP is \fI0x78\fP, which is the ASCII character
Copy link
Member

@alejandro-colomar alejandro-colomar Dec 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are literals, and should be bold, I think.

Comment on lines -2640 to +2641
** separate \fCmessage/rfc822\fP MIME part instead of included in the main body of the
** separate \fImessage/rfc822\fP MIME part instead of included in the main body of the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quotation marks again.

Comment on lines -2652 to +2653
** Controls the decoding of complex MIME messages into \fCtext/plain\fP when
** Controls the decoding of complex MIME messages into \fItext/plain\fP when
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gbr

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quotation marks again.

Comment on lines -2742 to +2743
** e.g. \fC[[s]news://][username[:password]@]server[:port]\fP
** e.g. \fI[[s]news://][username[:password]@]server[:port]\fP
Copy link
Member

@alejandro-colomar alejandro-colomar Dec 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an interesting one.

The [] should be roman, since they are not variable. They convey meanining by saying that the enclosed text is optional.

Also, some parts are literal (:, @), and they should be bold. This is one of the most complex cases you'll find in a man(7) document, and involves 3 fonts in a single input line.

So, I'd use

.RB [[ s ] news:// ][ \fIusername\fP [ :\fIpassword\fP ] @ ] \fIserver\fP [ :\fIport\fP ]

using man(7) macros (plus some escapes where necessary). Or the following equivalent fully with escapes:

[[\fBs\fP]\fBnews://\fP][\fIusername\fP[\fB:\fP\fIpassword\fP]\fB@\fP]\fIserver\fP[\fB:\fP\fIport\fP]

Copy link

@g-branden-robinson g-branden-robinson Jan 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strictly speaking, it's not necessary to select the previous font with \fP immediately prior to changing it again, as with \fP\fI. But it can make a lengthy run of font-dancing easier to follow. There's a tradeoff between length and comprehensibility, in the sense of how much state you have to track in your brain.

This is also a situation where \c can ride to your rescue.

.RB [[ s ] news:// ]\c
.RI [ username\c
.RB [ :\c
.IR password ]\c
.BR @ ]\c
.IR server [\c
.BI : port\c
]

Copy link
Member

@alejandro-colomar alejandro-colomar Jan 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strictly speaking, it's not necessary to select the previous font with \fP immediately prior to changing it again, as with \fP\fI. But it can make a lengthy run of font-dancing easier to follow. There's a tradeoff between length and comprehensibility, in the sense of how much state you have to track in your brain.

I'm never sure if \fI\fB\fP returns to the I or to the font prior to it, which is why I prefer keeping a stack of 1. That way I'm sure of the behavior.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And if someone said \fC, the identity of the previous font may be implementation-dependent. 😮

Comment on lines -3157 to +3158
** of a \fCmultipart/signed\fP attachment when verifying it.
** of a \fImultipart/signed\fP attachment when verifying it.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gbr

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quotation marks again.

Comment on lines -3330 to +3331
** Note: gpg's \fCfixed-list-mode\fP option should not be used. It
** Note: gpg's \fIfixed-list-mode\fP option should not be used. It
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a command line option, and should be bold.

BTW, it is missing the leading --.

Copy link
Contributor

@ossilator ossilator Jan 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on a related note, all literal dashes need to be \-escaped.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ossilator: Agreed. That argues for bold or quotation marks, in my view.

Copy link
Member

@alejandro-colomar alejandro-colomar Jan 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't going to mention them for now, to not confuse too much. :)
But yeah, we need to fix the - afterwards.

Comment on lines -3348 to +3349
** Note: gpg's \fCfixed-list-mode\fP option should not be used. It
** Note: gpg's \fIfixed-list-mode\fP option should not be used. It
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leading -- is missing.

As a cmd flag, this should be bold.

Comment on lines 3424 to 3430
** If \fIset\fP, signed and encrypted messages will consist of nested
** \fCmultipart/signed\fP and \fCmultipart/encrypted\fP body parts.
** \fImultipart/signed\fP and \fImultipart/encrypted\fP body parts.
** .pp
** This is useful for applications like encrypted and signed mailing
** lists, where the outer layer (\fCmultipart/encrypted\fP) can be easily
** removed, while the inner \fCmultipart/signed\fP part is retained.
** lists, where the outer layer (\fImultipart/encrypted\fP) can be easily
** removed, while the inner \fImultipart/signed\fP part is retained.
** (PGP only)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gbr

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quotation marks again.

Comment on lines -3464 to +3465
** \fCmultipart/signed\fP PGP/MIME body part.
** \fImultipart/signed\fP PGP/MIME body part.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gbr

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quotation marks again.

Comment on lines -3626 to +3627
** If this variable is \fIset\fP, NeoMutt will try to use the "\fCLAST\fP" POP command
** If this variable is \fIset\fP, NeoMutt will try to use the "\fILAST\fP" POP command
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@g-branden-robinson what do you think of this one? I would make it bold, but I'm not entirely sure.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I certainly wouldn't use straight double quotes unless those are part of the literal.

I'd probably use both quotation marks and bold.

If this variable is
.IR set , \" is emphasis necessary here?
NeoMutt will try to use the
.RB \[lq] LAST \[rq]
POP command

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why lq and rq? I think bold should be enough, no?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I often add quotes (in roman) when a boldfaced literal comprises multiple words, so that when copying and pasting man page content, the boundaries of the literal are still visible. But yes, that's not necessary here. I don't think it's wrong in this scenario to omit or retain the quotation marks; that's more a question of style for the page author (or project style guide).

Comment on lines -3720 to +3721
** connections, e.g. with \fCssh(1)\fP. If the command returns a nonzero
** connections, e.g. with \fIssh(1)\fP. If the command returns a nonzero
Copy link
Member

@alejandro-colomar alejandro-colomar Dec 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm, I haven't checked the others. The (1) (or (N)) part should be roman. The \fI\fP should enclose only the name of the page, and not the parenthesized number. Please check all such occurences.

Copy link
Contributor

@ossilator ossilator Jan 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, actually, these should use the .MR macro.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's still not portable enough for neomutt(1).

Copy link

@g-branden-robinson g-branden-robinson Jan 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alejandro-colomar : Hey, don't wave him off! If neomutt wants to help usher in the MR revolution, I'm all for it! 😀

But a frank word about its portability is in order.

mandoc(1) added support for MR in its CVS over a year ago but has not done a release in 3 years. I'd expect Heirloom Doctools to update their copy of our extensions at some point, but at present its pace of development is pretty slow.

Comment on lines -3791 to +3792
** Those who use the \fCenscript\fP(1) program's mail-printing mode will
** Those who use the \fIenscript\fP(1) program's mail-printing mode will
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm, it seems there's a mix of style. This one is good.

Comment on lines -3984 to +3994
** can add your own prefixes by appending inside \fC"^(re)"\fP. For
** example: \fC"^(re|sv)"\fP or \fC"^(re|aw|sv)"\fP.
** can add your own prefixes by appending inside \fI"^(re)"\fP. For
** example: \fI"^(re|sv)"\fP or \fI"^(re|aw|sv)"\fP.
** .pp
** The second parenthesized expression matches zero or more
** bracketed numbers following the prefix, such as \fC"Re[1]: "\fP.
** The initial \fC"\\["\fP means a literal left-bracket character.
** bracketed numbers following the prefix, such as \fI"Re[1]: "\fP.
** The initial \fI"\\["\fP means a literal left-bracket character.
** Note the backslash must be doubled when used inside a double
** quoted string in the neomuttrc. \fC"[0-9]+"\fP means one or more
** numbers. \fC"\\]"\fP means a literal right-bracket. Finally the
** whole parenthesized expression has a \fC"*"\fP suffix, meaning it
** quoted string in the neomuttrc. \fI"[0-9]+"\fP means one or more
** numbers. \fI"\\]"\fP means a literal right-bracket. Finally the
** whole parenthesized expression has a \fI"*"\fP suffix, meaning it
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@g-branden-robinson Any opinion on these?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3985-3986 look like they should be bold, not italic.

I would spell ^ as \[ha] for good output on UTF-8 terminals and PDF.

3989-3990 offers an example and a "mention" instead of a "use" of a literal. I'd lose the italics and use only quotation, but proper quotation special characters as shown above, not neutral double quotes.

3992-3994 offers the same sort of specimens as 3989-3990. So roman quotation again, I'd say.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3985-3986 look like they should be bold, not italic.

I was having doubts because of:

  • It's an example, and we use italics for examples.

  • Or maybe we should consider that as a literal with placeholders inside, in which case it would be a mixed bold italics (italics for the letters).

What do you think?

I would spell ^ as \[ha] for good output on UTF-8 terminals and PDF.

+1

3989-3990 offers an example and a "mention" instead of a "use" of a literal. I'd lose the italics and use only quotation, but proper quotation special characters as shown above, not neutral double quotes.

In the Linux man-pages project we use italics for examples. Do you have different advice?

3992-3994 offers the same sort of specimens as 3989-3990. So roman quotation again, I'd say.

Copy link

@g-branden-robinson g-branden-robinson Jan 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I have different advice. I've never advised the use of italics for examples, inline or displayed.

I would use quotation for inline examples and EX/EE for displayed examples.

Because inline examples are so often multiple words, quoting them protects you from losing perceptibility of their boundaries when copy-and-pasting them.

Copy link
Member

@alejandro-colomar alejandro-colomar Jan 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because inline examples are so often multiple words, quoting them protects you from losing perceptibility of their boundaries when copy-and-pasting them.

A problem is that inline examples relatively often include (vertical) quotes (think of string literals, mainly; sometimes character literals too).

Copy link

@g-branden-robinson g-branden-robinson Jan 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that's much of a problem, and not one at all on UTF-8 or typesetting devices.

$ nroff -man <<EOF
.TH foobar 1 2025-01-01 "groff test suite"
We should have declared \[lq]char foo[]="bar";\[rq] as
.BR const .
EOF
foobar(1)                    General Commands Manual                   foobar(1)

We should have declared “char foo[]="bar";” as const.

groff test suite                   2025‐01‐01                          foobar(1)

Even on output devices lacking typographer's (directional) quotation marks, such as groff's ascii and latin1 output devices, it's not hard to deduce that the outermost set of quotes is the pair used for quotation, and only those.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmmm, okay. I'll keep that in mind, and maybe do some global reform some day. Not now, though.

Comment on lines -3997 to +3998
** tab. Note \fC"\t"\fP is converted to a literal tab inside a
** tab. Note \fI"\t"\fP is converted to a literal tab inside a
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a literal. Bold.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

\t isn't going to format like that:

$ nroff -man <<EOF
##> .TH neomuttrc 5 2025-01-01 "groff test suite"
.SH Description
Note \fI"\t"\fP is converted to a literal tab inside a
EOF
neomuttrc(5)                   File Formats Manual                  neomuttrc(5)

Description
     Note "" is converted to a literal tab inside a

groff test suite                   2025‐01‐01                       neomuttrc(5)

You need \[rs]t.

groff_man_style(7):

     \(rs   Reverse solidus (backslash).  The backslash is the default
            escape character in the roff language, so it does not
            represent itself in output.  Also see \e above.

Comment on lines -4057 to +4058
** If \fIset\fP, draft files (specified by \fC-H\fP on the command
** If \fIset\fP, draft files (specified by \fI-H\fP on the command
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cmd flag bold

Comment on lines -4067 to +4068
** If \fIset\fP, draft files previously edited (via \fC-E -H\fP on
** If \fIset\fP, draft files previously edited (via \fI-E -H\fP on
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cmd flag bold

Comment on lines -4268 to +4269
** adding a \fC--\fP delimiter (if not already present). Additional
** adding a \fI--\fP delimiter (if not already present). Additional
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

literal bold

Comment on lines -4657 to +4658
** \fCapplication/pkcs7-mime\fP attachments.
** \fIapplication/pkcs7-mime\fP attachments.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gbr

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quotation marks again.

Comment on lines -4672 to +4673
** of a \fCmultipart/signed\fP attachment when verifying it.
** of a \fImultipart/signed\fP attachment when verifying it.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gbr

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quotation marks again.

Comment on lines -4838 to +4839
** \fCmultipart/signed\fP, which can be read by all mail clients.
** \fImultipart/signed\fP, which can be read by all mail clients.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gbr

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quotation marks again.

Comment on lines -4864 to +4865
** This command is used to verify S/MIME signatures of type \fCmultipart/signed\fP.
** This command is used to verify S/MIME signatures of type \fImultipart/signed\fP.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gbr

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quotation marks again.

Comment on lines -4875 to 4877
** This command is used to verify S/MIME signatures of type
** \fCapplication/pkcs7-mime\fP.
** \fIapplication/pkcs7-mime\fP.
** .pp
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gbr

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quotation marks again.

Comment on lines -5123 to +5131
** If \fIset\fP (the default), NeoMutt will attempt to use \fCSTARTTLS\fP on servers
** If \fIset\fP (the default), NeoMutt will attempt to use \fISTARTTLS\fP on servers
** advertising the capability. When \fIunset\fP, NeoMutt will not attempt to
** use \fCSTARTTLS\fP regardless of the server's capabilities.
** use \fISTARTTLS\fP regardless of the server's capabilities.
** .pp
** \fBNote\fP that \fCSTARTTLS\fP is subject to many kinds of
** \fBNote\fP that \fISTARTTLS\fP is subject to many kinds of
** attacks, including the ability of a machine-in-the-middle to
** suppress the advertising of support. Setting $$ssl_force_tls is
** recommended if you rely on \fCSTARTTLS\fP.
** recommended if you rely on \fISTARTTLS\fP.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@g-branden-robinson What do you think? Bold? Italics?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd probably quote these since they are literals but not squarely within the topical domain of NeoMutt. They're relevant to the discussion of course, but since NeoMutt is theoretically independent of the network transport, STARTTLS is not a central matter.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Comment on lines -5369 to +5370
** of "\fCtext/plain; format=flowed\fP".
** of "\fItext/plain; format=flowed\fP".
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gbr

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quotation marks again.

Comment on lines -5384 to +5385
** Affects the \fC~b\fP, \fC~B\fP, and \fC~h\fP search operations described in
** Affects the \fI~b\fP, \fI~B\fP, and \fI~h\fP search operations described in
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are literals. Bold.

Comment on lines -5570 to +5574
** of sendmail which supports the \fC-B8BITMIME\fP flag (such as sendmail
** of sendmail which supports the \fI-B8BITMIME\fP flag (such as sendmail
** 8.8.x) or you may not be able to send mail.
** .pp
** When \fIset\fP, NeoMutt will invoke $$sendmail with the \fC-B8BITMIME\fP
** When \fIset\fP, NeoMutt will invoke $$sendmail with the \fI-B8BITMIME\fP
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cmd flags bold

Comment on lines -5594 to +5597
** \fC-f\fP command line switch. Therefore setting this option is not useful
** if the $$sendmail variable already contains \fC-f\fP or if the
** executable pointed to by $$sendmail doesn't support the \fC-f\fP switch.
** \fI-f\fP command line switch. Therefore setting this option is not useful
** if the $$sendmail variable already contains \fI-f\fP or if the
** executable pointed to by $$sendmail doesn't support the \fI-f\fP switch.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cmd flags bold

@g-branden-robinson
Copy link

g-branden-robinson commented Jan 2, 2025

@alejandro-colomar: I'll wager the NeoMutt developers didn't count on one of their MRs being the site of a summit between us on open questions in man page styling. 😂

Sorry, guys. If it helps, I'm a happy neomutt user. Albeit a little nonplussed when an IMAP connection gets rudely reset by GMail and it drops core. 😋

@ossilator
Copy link
Contributor

Albeit a little nonplussed when an IMAP connection gets rudely reset [...]

given the context, i'll have a slight chuckle at the common abuse of "nonplussed" here. 😋

@g-branden-robinson
Copy link

Albeit a little nonplussed when an IMAP connection gets rudely reset [...]

given the context, i'll have a slight chuckle at the common abuse of "nonplussed" here. 😋

I wouldn't say I abused it... Ordinarily when I experience a core dump, I get angry. 😈

In this case I am merely bewildered. No idea who to blame, and if it's Google, there's no point getting mad. The mindless juggernaut cares not what chaos it creates or RFCs it violates...

@ossilator
Copy link
Contributor

i mean that the word means literally the opposite of what it is now used for. better avoid it altogether.

@ossilator
Copy link
Contributor

as for the crash, that would be obviously a bug even if it's triggered by google being funny. so please follow the usual reporting procedure next time you repro it.

@g-branden-robinson
Copy link

i mean that the word means literally the opposite of what it is now used for. better avoid it altogether.

It's its own antonym, like "inflammable", or "French spacing"! Is this a good time to say "I could care less"? 😂

@alejandro-colomar
Copy link
Member

@alejandro-colomar: I'll wager the NeoMutt developers didn't count on one of their MRs being the site of a summit between us on open questions in man page styling. 😂

:D

Sorry, guys. If it helps, I'm a happy neomutt user.

:-)

Albeit a little nonplussed when an IMAP connection gets rudely reset by GMail and it drops core. 😋

I personally don't use neomutt(1)'s IMAP. I have mbsync(1) sync the mail, and then neomutt(1) read from a local maildir. This has the benefit of keeping a local backup of my mail server. My mind is calmed knowing neomutt(1)'s bugs (which sometimes happen), can't affect my mail server at all. Since mbsync(1) is a much simpler program, I don't expect it to be too dangerous.

BTW, I also use gmail (but am stopping that, I mainly use migadu now), so if you're interested in this, my config files might help.

mbsync(1):
https://www.alejandro-colomar.es/src/alx/alx/config.git/tree/home/.mbsyncrc

mutt(1):
https://www.alejandro-colomar.es/src/alx/alx/config.git/tree/home/.config/mutt/

@gahr
Copy link
Member

gahr commented Feb 18, 2025

Hi @charles2910 - are you still interested in addressing the comments and finish this up?

@charles2910
Copy link
Contributor Author

Hi @gahr. Yes! I'm tackling this MR this next weekend. Sorry for the delay, I attended Fosdem and took a week of vacation afterwards.

@charles2910 charles2910 marked this pull request as draft February 18, 2025 14:05
@gahr
Copy link
Member

gahr commented Feb 18, 2025

Hi @charles2910 , not at all, thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants