all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefankangas@gmail.com>
To: 59631@debbugs.gnu.org
Subject: bug#59631: 29.0.50; [PATCH] New check-man target to check man pages for errors
Date: Sun, 27 Nov 2022 07:23:49 -0800	[thread overview]
Message-ID: <CADwFkmmo=Ri5hLiWiHT8V4dVyZha4+WZrjjJAD=UoXMJhGNz0w@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 300 bytes --]

Severity: wishlist

The attached patch adds a new check-man target to check our man pages
for errors.  I know we prefer info over man, but why not.  It will catch
mistakes, like using unknown macros, etc.

To test this, change a macro like ".B" to ".BBB" in doc/man/emacs.1 and
run "make check-man".

[-- Attachment #2: 0001-Add-new-check-man-target.patch --]
[-- Type: text/x-diff, Size: 1067 bytes --]

From cc83e75ad0bc02d003b14a789f15dc94c6ab7899 Mon Sep 17 00:00:00 2001
From: Stefan Kangas <stefankangas@gmail.com>
Date: Sun, 27 Nov 2022 16:03:31 +0100
Subject: [PATCH] Add new check-man target

* Makefile.in (check-man): New target to check man pages for errors.
---
 Makefile.in | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/Makefile.in b/Makefile.in
index 93609a4e16..2d86df09bb 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -69,6 +69,10 @@
 #      check-expensive includes additional tests that can be slow.
 #      check-all runs all tests, including ones that can be slow, or
 #        fail unpredictably
+#
+# make check-man
+#      Check man pages for errors.
+#
 
 SHELL = @SHELL@
 
@@ -1322,6 +1326,15 @@ check-declare:
 	$(MAKE) -C lisp $@
 	$(MAKE) -C test $@
 
+.PHONY: check-man
+
+check-man:
+	@cd ${mansrcdir}; \
+	for page in *.1; do \
+	  LC_ALL=C.UTF-8 MANROFFSEQ='' MANWIDTH=80 \
+	  man --warnings -E UTF-8 -l -Tutf8 -Z "$$page" >/dev/null; \
+	done
+
 .PHONY: gitmerge
 
 GITMERGE_EMACS = ./src/emacs${EXEEXT}
-- 
2.35.1


             reply	other threads:[~2022-11-27 15:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-27 15:23 Stefan Kangas [this message]
2022-11-27 15:44 ` bug#59631: 29.0.50; [PATCH] New check-man target to check man pages for errors Eli Zaretskii
2022-11-27 17:49   ` Stefan Kangas
2022-11-27 18:15     ` Eli Zaretskii
2022-11-27 22:59       ` Stefan Kangas
2022-11-28 12:13         ` Eli Zaretskii
2022-12-01 15:02           ` Stefan Kangas
2022-12-01 16:01             ` Eli Zaretskii
2022-12-02 22:50               ` Richard Stallman
2022-12-03  7:06                 ` Eli Zaretskii
2022-12-03 14:20               ` Stefan Kangas
2022-12-03 14:39                 ` Eli Zaretskii
2022-12-09 10:25                   ` Stefan Kangas

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='CADwFkmmo=Ri5hLiWiHT8V4dVyZha4+WZrjjJAD=UoXMJhGNz0w@mail.gmail.com' \
    --to=stefankangas@gmail.com \
    --cc=59631@debbugs.gnu.org \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.