URL: <https://savannah.gnu.org/bugs/?68571>
Summary: [troff] `shift` request should not perform operation
if argument invalid
Group: GNU roff
Submitter: gbranden
Submitted: Tue 28 Jul 2026 03:20:48 AM UTC
Category: Core
Severity: 3 - Normal
Item Group: Feature change
Status: Confirmed
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Unlocked
Planned Release: None
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Tue 28 Jul 2026 03:20:48 AM UTC By: G. Branden Robinson <gbranden>
$ cat ATTIC/shift.groff
.de xx
. shift X
. tm \\$1
..
.xx foo bar
$ groff -a ATTIC/shift.groff
troff:ATTIC/shift.groff:5: error: numeric expression containing character 'X'
is invalid
bar
This straddles bug fix/feature change territory.
See NEWS items pending _groff_ 1.25 release.
* The `dt` request, when given invalid arguments, now does nothing
instead of removing any existing diversion trap. This change is
inconsistent with AT&T troff but more consistent with general *roff
syntax; as a rule, requests given invalid arguments (and that don't
process a list of similar objects, as `rm` and `rr` do) perform no
operation. (However, see "Other differences" in groff_diff(7) or
groff's Texinfo manual regarding `rm` and `rr` request behavior that
is discrepant among various troffs.)
* The `dt` and `wh` requests now enforce their requirement of space
between their arguments. While consistent with GNU troff input
syntax, said enforcement is not consistent with AT&T troff. We did
not add support in groff's AT&T troff compatibility mode because
we're aware of no legacy documents that require it. Example:
`.wh9i+.5+\n(xxuPT` is, while validly planting a trap for the `PT`
macro in AT&T troff, an input considerably more cryptic than any
specimens known to us.
In this case, there is no compatibility with AT&T _troff_ to break.
Handle this for _groff_ 1.26.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?68571>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
