[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #66122] [mom] but for `BoxStop`, package is `-wall`-clean
From: |
G. Branden Robinson |
Subject: |
[bug #66122] [mom] but for `BoxStop`, package is `-wall`-clean |
Date: |
Thu, 22 Aug 2024 14:42:12 -0400 (EDT) |
URL:
<https://savannah.gnu.org/bugs/?66122>
Summary: [mom] but for `BoxStop`, package is `-wall`-clean
Group: GNU roff
Submitter: gbranden
Submitted: Thu 22 Aug 2024 06:42:09 PM UTC
Category: Macro package mom
Severity: 3 - Normal
Item Group: Warning/Suspicious behaviour
Status: Need Info
Privacy: Public
Assigned to: PTPi
Open/Closed: Open
Discussion Lock: Any
Planned Release: None
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Thu 22 Aug 2024 06:42:09 PM UTC By: G. Branden Robinson <gbranden>
Hi Peter,
One of the "transparent device whatchamacallit" errors, the one that had
nothing to do with mom(7), fell very swiftly today.
I decided to turn on `-b` to help me track down the ones in _mom_ herself.
It occurred to me while I was there that while we know that `-ww` blitzes us
blue, `-wall`, the more gentle form prescribed for "traditional macro
packages", might not.
And this is the case. In fact there appears to be only one thing standing
between _mom_ and "-wall" cleanliness.
troff: backtrace: '../contrib/mom/om.tmac':24613: macro 'BoxStop'
troff: backtrace: '../contrib/mom/om.tmac':24125: macro 'PAUSE'
troff: backtrace: file '../contrib/mom/examples/slide-demo.mom':270
troff:../contrib/mom/examples/slide-demo.mom:270: warning: setting computed
line length 0u to device horizontal motion quantum
troff: backtrace: '../contrib/mom/om.tmac':24613: macro 'BoxStop'
troff: backtrace: '../contrib/mom/om.tmac':24125: macro 'PAUSE'
troff: backtrace: file '../contrib/mom/examples/slide-demo.mom':273
troff:../contrib/mom/examples/slide-demo.mom:273: warning: setting computed
line length 0u to device horizontal motion quantum
troff: backtrace: '../contrib/mom/om.tmac':24613: macro 'BoxStop'
troff: backtrace: '../contrib/mom/om.tmac':24125: macro 'PAUSE'
troff: backtrace: file '../contrib/mom/examples/slide-demo.mom':276
troff:../contrib/mom/examples/slide-demo.mom:276: warning: setting computed
line length 0u to device horizontal motion quantum
troff: backtrace: '../contrib/mom/om.tmac':24613: macro 'BoxStop'
troff: backtrace: '../contrib/mom/om.tmac':24125: macro 'PAUSE'
troff: backtrace: file '../contrib/mom/examples/slide-demo.mom':281
troff:../contrib/mom/examples/slide-demo.mom:281: warning: setting computed
line length 0u to device horizontal motion quantum
troff: backtrace: '../contrib/mom/om.tmac':24613: macro 'BoxStop'
troff: backtrace: '../contrib/mom/om.tmac':24172: macro 'BOX'
troff: backtrace: file '../contrib/mom/examples/slide-demo.mom':286
troff:../contrib/mom/examples/slide-demo.mom:286: warning: setting computed
line length 0u to device horizontal motion quantum
troff: backtrace: '../contrib/mom/om.tmac':24613: macro 'BoxStop'
troff: backtrace: '../contrib/mom/om.tmac':24172: macro 'BOX'
troff: backtrace: file '../contrib/mom/examples/mom-pdf.mom':616
troff:../contrib/mom/examples/mom-pdf.mom:616: warning: setting computed line
length 0u to device horizontal motion quantum
Thanks to the backtrace we can see that this is the same problem over and
over.
Here's the code.
24612 . if \\n[#IBR_ACTIVE] \{\
24613 . ll \\n[pdfbx-pre-ll]u
24614 . IB \\n[#IBL_ACTIVE]u \\n[#IBR_ACTIVE]u
24615 . rr pdfbx-pre-ll
24616 . rr #IBR_ACTIVE
24617 . rr #IBL_ACTIVE
24618 . \}
Apparently `pdfbx-pre-ll` is zero (possibly undefined). Could this be a logic
error? Would it be easy for you to fix?
Since you're deleting that register immediately, I conjecture that having it
undefined isn't a problem.
I therefore tentatively propose the following patch.
diff --git a/contrib/mom/om.tmac b/contrib/mom/om.tmac
index eb1c10181..8d1ae6298 100644
--- a/contrib/mom/om.tmac
+++ b/contrib/mom/om.tmac
@@ -24610,7 +24610,7 @@ .de BoxStop
. rr #IR_ACTIVE
. \}
. if \\n[#IBR_ACTIVE] \{\
-. ll \\n[pdfbx-pre-ll]u
+. ll (u;\\n[.H]>?\\n[pdfbx-pre-ll])
. IB \\n[#IBL_ACTIVE]u \\n[#IBR_ACTIVE]u
. rr pdfbx-pre-ll
. rr #IBR_ACTIVE
That quietens the build for me, and the shaded boxes demonstrated in
"slide-demo.pdf" look fine.
(Since the `.H` register _is_ the output device's horizontal motion quantum,
this simply does explicitly what a _roff_ formatter, even an old one, does in
such cases anyway.)
$ make -C build -j
make: Entering directory '/home/branden/src/GIT/groff/build'
make all-recursive
make[1]: Entering directory '/home/branden/src/GIT/groff/build'
make[2]: Entering directory '/home/branden/src/GIT/groff/build'
GROFF doc/automake.pdf
GROFF contrib/mom/examples/letter.pdf
GROFF contrib/mom/examples/mom-pdf.pdf
GROFF contrib/mom/examples/mon_premier_doc.pdf
GROFF contrib/mom/examples/sample_docs.pdf
GROFF contrib/mom/examples/slide-demo.pdf
GROFF contrib/mom/examples/copyright-default.pdf
GROFF contrib/mom/examples/copyright-chapter.pdf
GROFF contrib/mom/examples/typesetting.pdf
troff: backtrace: '../contrib/mom/om.tmac':24111: string 'PDF_AUTHORS'
troff: backtrace: '../contrib/mom/om.tmac':4914: macro 'AUTHOR'
troff: backtrace: file '../contrib/mom/examples/mon_premier_doc.mom':13
troff:../contrib/mom/examples/mon_premier_doc.mom:13: error: cannot translate
character code 233 to special character ''e' in device-independent output
troff: backtrace: '../contrib/mom/om.tmac':24111: string 'PDF_AUTHORS'
troff: backtrace: '../contrib/mom/om.tmac':4914: macro 'AUTHOR'
troff: backtrace: file '../contrib/mom/examples/mom-pdf.mom':20
troff:../contrib/mom/examples/mom-pdf.mom:20: error: cannot write a node to
device-independent output
make[2]: Leaving directory '/home/branden/src/GIT/groff/build'
make[1]: Leaving directory '/home/branden/src/GIT/groff/build'
make: Leaving directory '/home/branden/src/GIT/groff/build'
As shown above, the only diagnostics remaining are those I promised to look
into.
Abusing this bug for unrelated purposes, I noticed that the "image" and "pdf
image" examples in "slide-demo.mom" have a layout problem; they don't appear
where they're supposed to but they _do_ show up...on a slide by themselves
later.
Would you like me to commit the change I proposed above?
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?66122>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
- [bug #66122] [mom] but for `BoxStop`, package is `-wall`-clean,
G. Branden Robinson <=
- [bug #66122] [mom] but for `BoxStop`, package is `-wall`-clean, Peter Schaffter, 2024/08/22
- [bug #66122] [mom] but for `BoxStop`, package is `-wall`-clean, G. Branden Robinson, 2024/08/22
- [bug #66122] [mom] but for `BoxStop`, package is `-wall`-clean, Bjarni Ingi Gislason, 2024/08/23
- [bug #66122] [mom] but for `BoxStop`, package is `-wall`-clean, Bjarni Ingi Gislason, 2024/08/24
- [bug #66122] [mom] but for `BoxStop`, package is `-wall`-clean, Deri James, 2024/08/24
- [bug #66122] [mom] but for `BoxStop`, package is `-wall`-clean, Deri James, 2024/08/24
- [bug #66122] [mom] but for `BoxStop`, package is `-wall`-clean, G. Branden Robinson, 2024/08/24
- [bug #66122] [mom] but for `BoxStop`, package is `-wall`-clean, Deri James, 2024/08/24
- [bug #66122] [mom] but for `BoxStop`, package is `-wall`-clean, Peter Schaffter, 2024/08/25
- [bug #66122] [mom] but for `BoxStop`, package is `-wall`-clean, G. Branden Robinson, 2024/08/27