bug-groff
[Top][All Lists]
Advanced

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

[bug #59608] sample_docs.mom: error: an argument has a 'p' unit attached


From: Bjarni Ingi Gislason
Subject: [bug #59608] sample_docs.mom: error: an argument has a 'p' unit attached
Date: Sun, 17 Jan 2021 09:51:28 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

Follow-up Comment #4, bug #59608 (project groff):

  I was the culprit as I

1) removed a trailing space in too many strings

2) added a diagnostic line with the variable $ARG,
 which contained only the unit,
 and not with the parameter $1
 (which actually showed "13p")
 in the macro "RULE_WEIGHT"

3) did not check the output after I removed the unit (p),
 as the aborting stopped.  
 The output showed a thick underline about the height of a capital
letter.

  Lessons to learn

1) Look at the output of "git log".

2) Check the output after a warning or an error has disappeared.

3) Use the full argument in a diagnostic message, not a derived variable.

  Defects to correct in the "om.tmac" file and generally in others.

1) Mark significant trailing space as such,
that is

not just "...abc \"

  but

"...abc \"significant trailing space

or something like that to explain the space in front of the '\"'

Otherwise just use
...abc\" comment

2) Show all arguments in a diagnostic message

Diagnostic text in "om.tmac" not showing arguments are probably these:


1957:.          tm1 "[mom]: The first argument to \\$0 must be a numeric
1958:.          tm1 "       argument with a unit of measure appended, or
DEFAULT.
1959-.          tm1 "       Setting underline weight to DEFAULT.
--
1968:.          tm1 "[mom]: The second argument to \\$0 must be a numeric
1969:.          tm1 "       argument with a unit of measure appended, or
DEFAULT.
1970-.          tm1 "       Setting underline distance from baseline to
DEFAULT.
--
3112:.          tm1 "[mom]: The argument to \\$0 must not have a unit of
measure appended.
3113-.          ab   [mom]: Aborting '\\n[.F]' at \\$0, line \\n[.c].
--
3150:.                   tm1 "[mom]: Invalid argument given to macro \\$0 at
line \\n[.c].
3151-.                   tm1 "       Rule weight must be < 100 points.
3152-.                   tm1 "       Falling back to default weight .5
points.
--
10760:.       tm1 "[mom]: The first argument to \\$0 must be a numeric heading
level.
10761-.       ab   [mom]: Aborting '\\n[.F]' at \\$0, line \\n[.c].
--
11234:.          tm1 "[mom]: The first argument to \\$0 must be a numeric
heading level.
11235-.          ab   [mom]: Aborting '\\n[.F]' at \\$0, line \\n[.c].
--
11250:.             tm1 "[mom]: The UNDERSCORE argument to \\$0 requires a
rule weight.
11251-.             ab   [mom]: Aborting '\\n[.F]' at \\$0, line \\n[.c].
...
11256:.             tm1 "[mom]: The UNDERSCORE argument to \\$0 requires a
rule gap.
11257-.             ab   [mom]: Aborting '\\n[.F]' at \\$0, line \\n[.c].
--
11270:.             tm1 "[mom]: The UNDERSCORE2 argument to \\$0 requires a
rule weight.
11271-.             ab   [mom]: Aborting '\\n[.F]' at \\$0, line \\n[.c].
...
11276:.             tm1 "[mom]: The UNDERSCORE2 argument to \\$0 requires a
rule gap.
11277-.             ab   [mom]: Aborting '\\n[.F]' at \\$0, line \\n[.c].
...
11282:.             tm1 "[mom]: The UNDERSCORE2 argument to \\$0 requires an
inter-rule gap.
11283-.             ab   [mom]: Aborting '\\n[.F]' at \\$0, line \\n[.c].
--
16066:.          tm1 "[mom]: You must append a number to the '\\$1' argument
to \\$0.
16067-.          tm1 "       The number should be the total number of items in
this list.
16068-.          tm1 "       See the documentation.
16069-.          ab   [mom]: Aborting '\\n[.F]' at \\$0, line \\n[.c].
--
16224:.             tm1 "[mom]: You must follow the \\$1 argument to \\$0 with
the widest
16225-.             tm1 "       enumerator to be used.  See the
documentation.
16226-.             ab   [mom]: Aborting '\\n[.F]' at \\$0, line \\n[.c].
--
16998:.       tm1 "[mom]: NUMBER_LINES at line \\n[.c] has no argument.
16999-.       tm1 "       You have forgotten to give a starting line number or
'RESUME'.
17000-.       ab   [mom]: Aborting '\\n[.F]' at \\$0, line \\n[.c].
--
19501:.          tm1 "[mom]: You must supply a \\*[missing-arg] argument to
\\$0.
19502-.          tm1 "       If you wish the \\*[missing-arg] to be blank, use
\\*[missing-arg] "".
19503-.          ab   [mom]: Aborting '\\n[.F]' at \\$0, line \\n[.c].
--
20381:.             tm1 "[mom]: \\$1 argument to \\$0 at line \\n[.c], but MLA
style not enabled.
20382-.             tm1 "       Ignoring \\$1, but continuing to process.
--
20937:.    tm1 "[mom]: TS at line \\n[.c] has CAPTION but no H argument.
20938-.    tm1 "       CAPTION requires H with a corresponding .TH.
20939-.    ab   [mom]: Aborting '\\n[.F]'.
--
21126:.          tm1 "[mom]: Invalid argument \\$1 to \\$0.
21127-.          tm1 "       Must be 'CONTINUED', 'CONT', or '...'
21128-.          ab   [mom]: Aborting '\\n[.F]' at line \\n[.c].
--
22595-.       tm1 "[mom]: 1.x-style \\$0 detected, but you are using v2.x.
22596:.       tm1 "       v2.x requires flags before arguments to \\$0.
22597-.       tm1 "       Please read docelement.html#mn-init and update your
file.
22598-.       ab   [mom]: Aborting '\\n[.F]' at \\$0, line \\n[.c].
--
23006:.          tm1 "[mom]: All three arguments to \\$0 at line \\n[.c] must
be decimal.
23007-.          tm1 "       Continuing to process using default link color.
--
23546:.          tm1 "[mom]: \\$0 inset argument at line \\n[.c]
23547-.          tm1 "       of '\\n[.F]' requires a unit of measure.
23548-.          tm1 "       Default 6 point inset will be used instead.
--
23568:.             tm1 "[mom]: \\$0 rule weight argument at line \\n[.c]
23569-.             tm1 "       of '\\n[.F]' must not have a unit of measure
appended.
23570-.             tm1 "       Default .5 rule weight will be used instead.
--
23579:.          tm1 "[mom]: \\$0 color argument '\\$1' at line \\n[.c]
23580-.          tm1 "       of '\\n[.F]' is not a valid color.
23581-.          tm1 "       Default black will be used instead.


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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