tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Kristaps Dzonsons <kristaps@bsd.lv>
To: tech@mdocml.bsd.lv
Subject: Re: mdocml: Add a "last child" member of struct mdoc_node.
Date: Wed, 22 Dec 2010 13:35:36 +0200	[thread overview]
Message-ID: <4D11E288.1010307@bsd.lv> (raw)
In-Reply-To: <20101221225958.GA9705@iris.usta.de>

>> Add a "last child" member of struct mdoc_node.
>> Remove `Pp' or `Lp' if it is the FIRST or LAST child of an `Sh' or `Sh' body.
>
> Keeping track of the last child looks nice, ...
>
>> Make "skipping paragraph" be an error, not a warning, as information (an
>> invoked macro) is ignored.
>
> ... but i disagree with this part.  When we say, in mandoc(1),
>
>    error  An input file contains syntax that cannot be safely interpreted,
>           either because it is invalid or because mandoc does not
>           implement it yet.  By discarding part of the input or inserting
>           missing tokens, the parser is able to continue, and the error
>           does not prevent generation of formatted output, but typically,
>           preparing that output involves information loss, broken document
>           structure or unintended formatting.
>
> i think the most important part is the first line:
>    *cannot be safely interpreted*
> The wording at the end,
>    *information loss*,
> is not a definition, but rather an example.
>
> In any case, we are not talking about information in the mathematical
> sense here, but about information that matters to the user, information
> that, when being lost, could cause the user to misunderstand the
> content of the manual.  So, i would consider anything that might
> cause loss of a blank line, or insertion of one in excess, to be safe.
>
> Also, this distinction is not academical, but it has practical
> consequences.  I'm telling people that, as long as there are errors,
> they should use groff to format the manual.  I'm telling them that
> errors are what gives them broken manuals, with wrong content
> or unintelligible formatting, for porters to worry about;
> while warnings only means unclean source code, with no serious
> impact on manual content, merely for authors to worry about,
> in case they care about nice mdoc(7) usage.
>
> Here, we clearly have the second case, a warning, not an error.

Ingo,

Hm, I didn't consider this in the practical context of broken manuals 
qua groff (I blame my academical day job ;)).  In that light, your 
argument makes perfect sense, so I've reverted the change.  I'll keep 
this in mind when adding warnings and errors in the future...

> P.S.
> See here for the full story:
> http://www.openbsd.org/faq/ports/specialtopics.html#Mandoc

Wow, that looks great!  And don't kill Espie!  :-)

Thanks again,

Kristaps
--
 To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv

      reply	other threads:[~2010-12-22 11:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <201012152339.oBFNdeuH023314@krisdoz.my.domain>
2010-12-21 22:59 ` Ingo Schwarze
2010-12-22 11:35   ` Kristaps Dzonsons [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D11E288.1010307@bsd.lv \
    --to=kristaps@bsd.lv \
    --cc=tech@mdocml.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).