Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.groff.bug > #1592 > unrolled thread

Re: [bug #57485] [PATCH] accept any number of arguments for .Dd in the groff_mdoc(7) macros

Started bySteffen Nurpmeso <steffen@sdaoden.eu>
First post2019-12-27 00:09 +0100
Last post2019-12-27 00:09 +0100
Articles 1 — 1 participant

Back to article view | Back to gnu.groff.bug

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [bug #57485] [PATCH] accept any number of arguments for .Dd in the groff_mdoc(7) macros Steffen Nurpmeso <steffen@sdaoden.eu> - 2019-12-27 00:09 +0100

#1592 — Re: [bug #57485] [PATCH] accept any number of arguments for .Dd in the groff_mdoc(7) macros

FromSteffen Nurpmeso <steffen@sdaoden.eu>
Date2019-12-27 00:09 +0100
SubjectRe: [bug #57485] [PATCH] accept any number of arguments for .Dd in the groff_mdoc(7) macros
Message-ID<mailman.1482.1577401785.1979.bug-groff@gnu.org>
Ingo Schwarze wrote in <20191226222825.GA23427@athene.usta.de>:
 |I'm not posting these answers into the bugtracker because these
 |points are not relevant for evaluating the patch; i'm merely sending
 |this mail to avoid that people get confused by the misleading
 |statements.
 |
 |Steffen Nurpmeso wrote on Thu, Dec 26, 2019 at 09:06:00PM +0100:
 |
 |> And i have to go back to
 |>   .\"     @(#)tmac.doc.old        5.2 (Berkeley) 3/13/91
 |
 |That is totally irrelevant.  That file doesn't even implement the
 |same language we are talking about (mdoc v3).  It implements the
 |substantially different mdoc v2 language.  Manual pages written in
 |one cannot be formatted with a formatter for the other at all, nor
 |vice versa.
 |
 |> I mean, FreeBSD imported groff very early
 |
 |FreeBSD was forked off 386BSD 0.1 which in turn was forked off
 |4.3BSD-Net/2, which already contained groff several years before
 |FreeBSD even existed, so the statement that FreeBSD imported groff
 |is quite misleading.

Ok then, true.  But it was imported into the BSD tree very early,
that much is plain.  A couple of years ago i was spending quite
some time on the CSRG repo, and was surprised.

So when i look into that tree again and grep for Dd is see that
they used a Dd without arguments, but already documented

  075600a7df:share/man/man7/mdoc.samples.7:.Dd
  075600a7df:share/man/man7/mdoc.samples.7:.Tp Li \&.Dd month day, year

in 1990:

  .Dl Li \&.Os BSD 4.4
  .Tp Li \&.Dd month day, year
  The date should be written formally:
  .Pp
  .Dl January 25, 1989
  .\"  is not a standard SCCS id-key. ??

In Unix tradition i find it even amusing that for that very manual
mandoc says

  BSD 4.4 December 26, 2019 BSD 4.4

whereas groff says

  mdoc error: .Ds defunct (#895)
  mdoc error: .Ds defunct (#936)
  mdoc error: .Ds defunct (#984)
  mdoc warning: Using a macro as first argument cancels effect of .Li (#1014)
  mdoc error: .Ds defunct (#1014)
  Usage: .Li argument ... (#1021)
  mdoc error: .Ds defunct (#1031)
  mdoc warning: Using a macro as first argument cancels effect of .Li (#1098)
  mdoc error: .Ds defunct (#1098)
  Usage: .Ss not callable by other macros (#1100)
  mdoc error: .Ds defunct (#1229)
  mdoc error: .Ds defunct (#1297)

  ...

  4.4BSD Epoch 4.4BSD

Given that the mdoc syntax as such is old style, and not truly
supported by the new mdoc macros, a reference to Epoch is cool.
That is a little bit as if a C compiler would echo "i cannot
compile B" or what for a B file.

 |> Names like dbus-update-activation-environment could
 |> become a problem in conjunction with a date and something else
 |> a little longer.
 |
 |No, *names* cannot cause line breaks.  The footer line only contains
 |the .Os identifier and the date, no name whatsoever.

So then.  Ok.  But i like being explicit.  Even if it does not
matter.  I guess the inventor of it did something future proof.
How often have i myself patched something wildly, braking some
stuff because i had forgotten context.  Whatever.

 |> Well, i personally would rather do something like
 |
 |[... ineffective patches snipped ...]
 |
 |Your patches fail to fix the bug.
 |The original 4.4BSD manuals i listed are still misformatted with
 |your patches, and so are modern FreeBSD xo_attr(3) and ld(7)
 |and modern NetBSD dns-sd(1).

These require patches to be sent upstream for sure, they belong to
external software, and are simply broken mdoc syntax, right.
Especially bad for libxo which is so tightly coupled to FreeBSD,
and i wonder whether why FreeBSD "igor" tool does not check that?

I mean, i for one would _not_ do your patch.  I would instead
readd a warning, and scream out loud that the command is misused
according to rules invented thirty years ago.

 --End of <20191226222825.GA23427@athene.usta.de>

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)

[toc] | [standalone]


Back to top | Article view | gnu.groff.bug


csiph-web