Subject: bug#59631: closed (Re: bug#59631: 29.0.50; [PATCH] New check-man target to check man pages for errors)

From: [email-masked] (GNU bug Tracking System)
Date: Fri, 09 Dec 2022 10:26:02 +0000

Your bug report

#59631: 29.0.50; [PATCH] New check-man target to check man pages for errors

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
59631: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59631
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#59631: 29.0.50; [PATCH] New check-man target to check man pages for errors
From: Stefan Kangas <[email-masked]>
To: Eli Zaretskii <[email-masked]>
Cc: [email-masked]
Date: Fri, 9 Dec 2022 02:25:43 -0800
List-Id: <debbugs-submit.debbugs.gnu.org>

Eli Zaretskii <[email-masked]> writes:

> Nah, just install your variant.  It isn't worth the hassle to do
> anything more complex.  I have the command in my notes and will use it
> if and when required.

Thanks, pushed to emacs-29 (commit d3d9676bf8).  Closing.

Subject: 29.0.50; [PATCH] New check-man target to check man pages for errors
From: Stefan Kangas <[email-masked]>
To: [email-masked]
Date: Sun, 27 Nov 2022 07:23:49 -0800
List-Id: <debbugs-submit.debbugs.gnu.org>

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".
From cc83e75ad0bc02d003b14a789f15dc94c6ab7899 Mon Sep 17 00:00:00 2001
From: Stefan Kangas <[email-masked]>
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