bug-groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #64466] [ms] poorly diagnosed diversion error


From: G. Branden Robinson
Subject: [bug #64466] [ms] poorly diagnosed diversion error
Date: Fri, 4 Aug 2023 15:11:41 -0400 (EDT)

Follow-up Comment #1, bug #64466 (project groff):

[comment #0 original submission:]
> There was no follow-up on the list, and while the error text has improved a
bit since 1.20.1, the second error is still not as helpful as the first, and
it seems (says someone who has never looked at the ms code) a simple enough
condition to detect earlier (presuming .KS can't legally nest).

It apparently *can*.


$ cat EXPERIMENTS/nested-keep.ms
.pl 20v
.LP
Hello!
.KS
This my keep.
.KS
Now I'm nesting.
.nf
I'm gonna put a bunch of lines on the output to force a page break.
.nr i 0 1
.while (\n[i] < 20) \n+[i]
.KE
How is this working out?
.KE
Are we okay?
$ nroff -ms EXPERIMENTS/nested-keep.ms|cat -s

Hello!

                               ‐2‐

This my keep.

                               ‐3‐

Now I’m nesting.
I’m gonna put a bunch of lines on the output to force a page break.
1
2
3
4
5
6

                               ‐4‐

7
8
9
10
11
12
13
14

                               ‐5‐

15
16
17
18
19
20
How is this working out?
Are we okay?

                               ‐6‐



Also, there is more than one cause of diversions.  They're used for cover
sheet information and footnotes, too.  So when I revised the diagnostic
messages I found it difficult to improve on the (new) status quo.

https://git.savannah.gnu.org/cgit/groff.git/commit/?id=c7b14cb8f84b102dd591843a4e7fc2fbfe2a25a3

> Reordering the lines has a similar effect to the one Doug observed:

> $ sed -n '1p; 2h; 3{p;g;p}; 4p' test.ms | groff -ms > /dev/null
> s.tmac: error: diversion open while ejecting page (last file seen: <standard
input>) (recovering)




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?64466>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]