URL:
  <https://savannah.gnu.org/bugs/?66219>

                 Summary: Line numbering interacts unexpectedly with diversion
definition
                   Group: GNU roff
               Submitter: barx
               Submitted: Sat 14 Sep 2024 09:06:55 PM CDT
                Category: Core
                Severity: 2 - Minor
              Item Group: Documentation
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Sat 14 Sep 2024 09:06:55 PM CDT By: Dave <barx>
When line numbering is active, lines in a diversion are numbered when the
diversion is defined rather than when it's output--even if it's never output
at all.

This may be intentional (at least Heirloom troff works the same way), so I'm
opening it as a documentation bug since it's counterintuitive.  I'm not
convinced it's desirable, so it could arguably be considered a longstanding
behavior bug, but I'm also not sure it's fixable in any reasonable way, given
that a diversion stores formatted text.

$ cat number-lines.rf
.nf
.nm 1
Line 1
Line 2
.di xxx
Diverted line
.di
Line 3
Line 4
$ nroff number-lines.rf | cat -s
  1 Line 1
  2 Line 2
  4 Line 3
  5 Line 4










    _______________________________________________________

Reply to this item at:

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

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

Attachment: signature.asc
Description: PGP signature

Reply via email to