bug-groff
[Top][All Lists]
Advanced

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

[bug #61646] [me] line numbering doesn't work as documented


From: G. Branden Robinson
Subject: [bug #61646] [me] line numbering doesn't work as documented
Date: Sun, 2 Jan 2022 10:37:39 -0500 (EST)
User-agent: Lynx/2.8.9rel.1 libwww-FM/2.14 SSL-MM/1.4.1 GNUTLS/3.6.7

Update of bug #61646 (project groff):

                  Status:             In Progress => Fixed                  
             Open/Closed:                    Open => Closed                 
         Planned Release:                    None => 1.23.0                 

    _______________________________________________________

Follow-up Comment #6:

I didn't end up changing much more; I parameterized the behavior in
question by adding a `no` register.

We'll see if anyone who uses this feature wants to complain about it.


commit d47ea06e3643f47b94a90555204887d5c8f0ef82
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Sun Jan 2 21:03:39 2022 +1100

    [me]: Revise `n1` and `n2` interface and behavior.
    
    There were several bugs in the previous implementation.
    
    * tmac/e.tmac (po): Issue diagnostic if an attempt is made to set the
      page offset to a negative value.
    
      (n1): Accept new optional "C" argument to behave more (but not
      exactly) like roff(1), as the formerly-recognized "c" argument to `n2`
      did.  If present, the line length is reduced by the same amount (in
      new interface register `no`) as the line number field to preserve the
      overall line length.  Save the previous line length in the register in
      `_l` and set a flag, stored in `?N`, indicating this reduction.
      Otherwise, the macro expects to be able to reduce the page offset to
      accommodate the line number.  If it cannot (for example, with the zero
      page offset default used by nroff output devices), see above re: the
      `po` macro.
    
      (n2): Cache the last line number that may have been output, instead of
      the current one, so that we can operate it on it consistently with
      user expectations.  Do this earlier, and rename this macro-local
      variable from `_ln` to `_n` so that we don't need groff's `do` request
      to operate on it.  Drop recognition of "c" as an optional second
      argument.  If turning off line numbering: if the line length was
      shortened (`?N`) restore the saved value and delete `_l` register;
      otherwise, reverse the change to the page offset.  Delete `_n`
      register.
    
      (initialization): Assign `\w'0000'u` to `no` register; this was
      previously hard-coded in `n1` and `n2`.  Initialize `?N` with 0.
    
    * doc/meref.me.in (roff Support): Update to reflect interface changes
      and describe behavior more accurately.
    
    * doc/meref.me.in (Summary):
    * tmac/groff_me.7.in (Registers): Document new `no` register and mark it
      as a groff extension.
    
    * NEWS: Add item documenting interface changes.
    
    Fixes <https://savannah.gnu.org/bugs/?61646>.  See the comments in the
    report for a lengthy enumeration of rendering problems exhibited by the
    previous implementation.



    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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