bug-groff
[Top][All Lists]
Advanced

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

[bug #61671] [me] troff throws warning if `2c` macro's 1st argument expl


From: G. Branden Robinson
Subject: [bug #61671] [me] troff throws warning if `2c` macro's 1st argument explicitly empty
Date: Tue, 14 Dec 2021 01:59:17 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

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

                 Summary: [me] troff throws warning if `2c` macro's 1st
argument explicitly empty
                 Project: GNU troff
            Submitted by: gbranden
            Submitted on: Tue 14 Dec 2021 06:59:16 AM UTC
                Category: Macro - me
                Severity: 3 - Normal
              Item Group: Incorrect behaviour
                  Status: In Progress
                 Privacy: Public
             Assigned to: gbranden
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None

    _______________________________________________________

Details:

Input:

$ cat EXPERIMENTS/columns-and-footnotes.me 
.pl 20v
.2c "" 3
.pp
Jackdaws love my big sphinx of quartzA.
Jackdaws love my big sphinx of quartzB.
Jackdaws love my big sphinx of quartzC.
Jackdaws love my big sphinx of quartzD.
Jackdaws love my big sphinx of quartzE.
Jackdaws love my big sphinx of quartzF.
Jackdaws love my big sphinx of quartzG.


groff 1.22.4 output:


$ nroff -me EXPERIMENTS/columns-and-footnotes.me | cat -s
troff: EXPERIMENTS/columns-and-footnotes.me:2: warning: numeric expression
expected (got 'n')
troff: EXPERIMENTS/columns-and-footnotes.me:4: warning [p 1, 1.2i]: cannot
adjust line
troff: EXPERIMENTS/columns-and-footnotes.me:6: warning [p 1, 2.2i]: cannot
adjust line

     Jackdaws        Jackdaws love  my    sphinx         of
love    my    big    big   sphinx   of    quartzE.    Jack‐
sphinx         of    quartzC.    Jack‐    daws  love my big
quartzA.    Jack‐    daws  love my big    sphinx         of
daws  love my big    sphinx         of    quartzF.    Jack‐
sphinx         of    quartzD.    Jack‐    daws love my  big
quartzB.             daws love my  big    sphinx         of

quartzG.



meref.me says nothing about `2c`'s `S` argument having to be non-empty, and it
is bad UX to force the user to look up and specify the default column
separation (either literally or using name of the `$s` register so they can
interpolate it themselves as part of the request).  What if the user wants the
default separation but knows how many columns they want?  (As I just did?)

The obvious thing to do with an empty argument is use the default without
complaint.

So I'll do that.




    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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