[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #63470] [troff] ramifications of `chop` not fully illuminated
From: |
G. Branden Robinson |
Subject: |
[bug #63470] [troff] ramifications of `chop` not fully illuminated |
Date: |
Mon, 29 Jan 2024 17:15:21 -0500 (EST) |
Update of bug#63470 (group groff):
Item Group: Incorrect behaviour => Documentation
Summary: [troff] `nop` and output line continuation `\c`
interact magically => [troff] ramifications of `chop` not fully illuminated
_______________________________________________________
Follow-up Comment #1:
The answer is that *roff is a macro language, not a procedural one.
If you chop the final newline from a diversion and then emit it, then in its
interpolation context *there is no final newline*.
So the next thing in the input stream that is interpreted is processed in
whatever the context established by the diversion was.
Usually, this will be a text line.
$ cat EXPERIMENTS/magic-diversion.groff
.di foo
This is my diversion.
.br
.di
.foo
.nop How do you like it?
.chop foo
.foo
.nop Does it suit?
.pl \n[nl]u
$ nroff EXPERIMENTS/magic-diversion.groff
This is my diversion. How do you like it? This is my
diversion..nop Does it suit?
If this stumped me, it may stump others. Discuss it more in our Texinfo
manual, and possibly alongside the `chop` request in the _groff_(7) and/or
_groff_diff_(7) man pages.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?63470>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bug #63470] [troff] ramifications of `chop` not fully illuminated,
G. Branden Robinson <=