Add a New Comment Rich Markup
comment #1:
> I'll file a separate bug for the incorrect diagnosis
If this was ever done, I couldn't find it, so I just opened bug #64439 for this.
I just ran into the same diagnostic! We may be poking our fingers into similar things. But in my case, I got it on legitimate input. I'll file a separate bug for the incorrect diagnosis (rather than the wording) but wanted to record it here as well.
$ cat ATTIC/defchar.groff .char \[BS] BELL LABS .ds mystr ABC\[BS] .nf \[rs][BS] -> \[BS] mystr -> \*[mystr] .chop mystr mystr -> \*[mystr] .pl \n[nl]u $ ./build/test-groff -Tascii ATTIC/defchar.groff troff:ATTIC/defchar.groff:7: error: a newline character is not allowed in an escape sequence parameter \[BS] -> BELL LABS mystr -> ABCBELL LABS mystr -> ABC
This problem is not new to groff 1.23.0; it's in 1.22.4, with old language.
$ nroff ATTIC/defchar.groff troff: ATTIC/defchar.groff:7: a newline character is not allowed in an escape name \[BS] ‐> BELL LABS mystr ‐> ABCBELL LABS mystr ‐> ABC
A bracket-delimited escape used in an argument to a string must be quoted. Commit 17ee46a8, part of which was motivated by http://lists.gnu.org/r/groff/2022-11/msg00185.html, documented this clearly. But a user who forgets this requirement is met with a cryptic diagnostic.
$ cat string_test .ds str hello \\$1 \*[str \[aq]] $ groff string_test > /dev/null troff:string_test:2: error: a newline character is not allowed in an escape sequence parameter
In the email thread (which continues briefly at http://lists.gnu.org/r/groff/2022-12/msg00001.html, which is not linked to the rest of the thread due to the archival software's limitations), Branden explains how the parser processes this input, and surmises that at the point it realizes it's in trouble, it may not be a in a good position to explain why. But he admits the matter requires further investigation, hence this low-priority ticket to put the issue on the radar after more pressing matters have been resolved.
(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)
Attach Files: Comment:
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Only logged-in users can vote.
Please enter the title of George Orwell's famous dystopian book (it's a date):
Copyright © 2023 Free Software Foundation, Inc. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. The Levitating, Meditating, Flute-playing Gnu logo is a GNU GPL'ed image provided by the Nevrax Design Team. Source Code
Powered by Savane 3.12