Bug 550

Summary: Problems with .Ql in mdoc
Product: Portable OpenSSH Reporter: Colin Watson <cjwatson>
Component: DocumentationAssignee: OpenSSH Bugzilla mailing list <openssh-bugs>
Status: CLOSED FIXED    
Severity: minor    
Priority: P2    
Version: -current   
Hardware: All   
OS: All   
Attachments:
Description Flags
Fix punctuation in argument to .Ql none

Description Colin Watson 2003-04-29 22:27:46 AEST
Punctuation characters need to be escaped in the argument to .Ql, or you end up
with the output containing things like ''! rather than '!'. Xavier Renaut
reported this in http://bugs.debian.org/191131.

I'll attach a patch in a moment.
Comment 1 Colin Watson 2003-04-29 22:29:51 AEST
Created attachment 277 [details]
Fix punctuation in argument to .Ql

There's a rationale for why \& is needed in the "Other Possible Pitfalls"
section of groff_mdoc(7).
Comment 2 Ben Lindstrom 2003-04-30 03:42:23 AEST
Have you considered this to be a bug in groff?  This is not producable under 
any of the BSDs.
Comment 3 Colin Watson 2003-04-30 04:02:26 AEST
It's documented as behaving this way for punctuation characters that end
sentences, and as far as I know groff's mdoc implementation is maintained to a
large extent by the FreeBSD team, so I rather doubt it. However, I've just asked
the groff mailing list for an opinion.

I also note that the OpenSSH man pages already use the \& construction in a
number of other places for exactly the same reason.
Comment 4 Colin Watson 2003-04-30 06:11:35 AEST
Werner Lemberg, the groff maintainer, says:

It's not a bug, it's a logical extension.  The old BSD mdoc macros are
not consequent here for reasons beyond my knowledge: Look at the `z.',
`z,', ... registers in old BSD's doc-common and you can see that `z!'
and `z?' are missing, while groff's mdoc has `doc-punct!' and
`doc-punct?'.

IMHO the OpenSSH team should apply your patch even if not necessary
for old BSD's mdoc macros.
Comment 5 Ben Lindstrom 2003-04-30 11:01:05 AEST
Applied upstream along with escaping * while we are here since it is proper, but does not 
affect us (suggested by jmc of OpenBSD). 
Comment 6 Damien Miller 2004-04-14 12:24:19 AEST
Mass change of RESOLVED bugs to CLOSED