Follow-up Comment #3, bug #67347 (group groff): gbranden@ "thought bubbled":
> The existing `\)` escape sequence has only one user: groff _mdoc_. Since it has been documented at the end of https://www.gnu.org/software/groff/manual/groff.html.node/Dummy-Characters.html , some user documents that are not manual pages might use it, though. Not sure how likely that is, maybe not very. > I don't think the mdoc language ever encourages its users to employ this > escape sequence, in other words to put `\)` into their documents. Certainly not. I did not recall seeing a manual page using \). The roff(7) manual page from the mandoc package strongly discourages using this escape sequence not only once, but in two different ways: 1. ESCAPE SEQUENCE REFERENCE The mandoc(1) roff parser recognises the following escape sequences. In mdoc(7) and man(7) documents, using escape sequences is discouraged except for those described in the LANGUAGE SYNTAX section above. The LANGUAGE SYNTAX section does not mention \). 2. \) Zero-width space transparent to end-of-sentence detection; ignored by mandoc(1). I checked the following manual page collections with grep(1) for use of \): 1. My private collection of manual pages that have caused trouble in the past. The only one in that collection that used \) is the old, now deleted groffer(1) page. It contained this code inside a (horrendous) macro definition: . ds @pre \)\\$1\)\" prefix . ds @sep \)\\$2\)\" separator . ds @post \)\\$3\)\" postfix 2. OpenBSD base system and Xenocara manuals: no match 3. The ports manual pages i currently have installed: no match (That's only a tiny fraction of the ports tree, though.) 4. Linux man pages project: no match 5. FreeBSD 14.2: krb5_fileformats(3) contains this text line: Quoted principal (quote character is \) [string] https://man.bsd.lv/FreeBSD-14.2/krb5_fileformats.3 https://man.freebsd.org/cgi/man.cgi?query=krb5_fileformats Looks like a simple escaping mistake to me. No other match. 6. NetBSD 10.1 has several matches: man1/groff.1:. nop \)\$* man5/groff_out.5:. nop \)\$* man5/groff_tmac.5:. nop \)\\$*\) man5/groff_tmac.5:. Text .\~nop\~\[rs])\[rs]\[rs]$*[rs]\) man5/tmac.5:. nop \)\\$*\) man5/tmac.5:. Text .\~nop\~\[rs])\[rs]\[rs]$*[rs]\) man7/groff.7:. nop \)\$* man7/groff_trace.7:. nop \)\\$*\) man7/roff.7:. nop \)\$* Looks like \) was (slightly) more widely used in some old version of groff. IIUC, you intend to change the semantics of \) from "zero-width space transparent to end of sentence detection" to "freeze the current end of sentence detection status until the end of the word". I cannot say for sure how likely it is that that might cause problems for some existing general-purpose typesetting documents; maybe not very likely, for the following reason: if somebody put a non-EOS-transparent character right after \), the \) had no effect that i can see, so why did they use \) at all? I consider it very unlikely that the change will cause serious trouble in manual pages, both because manual pages should not contain this particular escape sequence, and even if they do, not only does the above general-purpose typesetting argument apply, but the worst possible consequence i can imagine is end of sentence detection changing value after a word containing \). That won't make the manual page unintelligible - at worst it might look ugly in a very minor way. If i understand correctly, the two main semantic changes are: 1. Right now, "x.\)x" does not end a sentence. After the change, it will. (But what was the point of writing that code?) 2. Right now, "x\)x." ends a sentence. After the change, it no longer will. (But what was the point of writing that code?) I believe item 1 is the whole point why you are considering this, so that incompatibility can't be avoided. If you worry about item 2, you can instead consider this semantics: 1. If the current end of sentence status is "yes", \) propagates that status to the end of the word. 2. If the current end of sentence status is "no", \) has no effect. Maybe before committing to the semantic change, you should research who introduced \) when, and whether they provided a rationale. _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?67347> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/
signature.asc
Description: PGP signature
