discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Raf Czlonka <rczlonka@gmail.com>
To: discuss@mandoc.bsd.lv
Subject: Clarification needed in regards to "WARNING: blank line in fill mode, using .sp"
Date: Tue, 28 Sep 2021 01:20:51 +0100	[thread overview]
Message-ID: <YVJf40PJ/wXYjHBp@gmail.com> (raw)

Hello,

While linting mdoc(7)-formatted manual pages, blank lines in them
generate the below warning message:

	mandoc: foo.1:20:1: WARNING: blank line in fill mode, using .sp

'.sp' is obviously a roff(7) request and the above, if not explicitly,
does seem to suggest using it is the "proper" way to fix the manual
page's formatting, at least implicitly.

This seem to be contrary to what the mdoc(7) manual page says:

	Many aspects of the basic syntax of the mdoc language are
	based on the roff(7) language; see the LANGUAGE SYNTAX and
	MACRO SYNTAX sections in the roff(7) manual for details,
	in particular regarding comments, escape sequences, whitespace,
	and quoting.  However, using roff(7) requests in mdoc
	documents is discouraged; mandoc(1) supports some of them
	merely for backward compatibility.

I'm obviously talking about the "discouraged" here as there's no
backward compatibility to speak of - as mentioned earlier, this is
an mdoc(7)-formatted manual page.

Given that '.sp' is nowhere to be found in mdoc(7) and is only
present in roff(7), perhaps the warning should mention '.Pp' macro
instead?

Without knowing any of the above, one might simply take the warning
at a face value and replace the blank line with roff(7)'s '.sp'.

What do others think? What should the linter say in order to aid
new authors in producing better-formatted mdoc(7) manual pages?

Regards,

Raf
--
 To unsubscribe send an email to discuss+unsubscribe@mandoc.bsd.lv


             reply	other threads:[~2021-09-28  0:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-28  0:20 Raf Czlonka [this message]
2021-09-28 15:10 ` Ingo Schwarze
2021-09-29 16:23   ` Raf Czlonka
2021-09-30 13:11     ` Ingo Schwarze

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=YVJf40PJ/wXYjHBp@gmail.com \
    --to=rczlonka@gmail.com \
    --cc=discuss@mandoc.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).