Subject: bug#27651: closed (Re: bug#27651: grep.1: macro `Dt' not defined)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 11 Jul 2017 15:25:02 +0000

Your bug report

#27651: grep.1: macro `Dt' not defined

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

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

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

Subject: Re: bug#27651: grep.1: macro `Dt' not defined
From: Paul Eggert <[email-masked]>
To: "Santiago R.R." <[email-masked]>, [email-masked]
Date: Tue, 11 Jul 2017 08:24:49 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

Thanks for the bug report. I installed the attached patch. It uses a 
hand-maintained date, which is more likely to give the user the (accurate) 
impression that the grep man page is not the focus of our documentation efforts.
>From 8d1953300ef03d05fb3864d944d1de81613a9bb6 Mon Sep 17 00:00:00 2001
From: Paul Eggert <[email-masked]>
Date: Tue, 11 Jul 2017 08:20:26 -0700
Subject: [PATCH] doc: define Dt string in man page

Problem reported by Bjarni I. Gislason via Santiago R.R. (Bug#27651).
* doc/grep.in.1 (dT): New macro.
(Dt): Define this string.
---
 doc/grep.in.1 | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/doc/grep.in.1 b/doc/grep.in.1
index 40c9586..ecc8105 100644
--- a/doc/grep.in.1
+++ b/doc/grep.in.1
@@ -1,4 +1,14 @@
 .\" GNU grep man page
+.de dT
+.ds Dt \\$2
+..
+.dT Time-stamp: "2017-06-21"
+.\" Update the above date whenever a change to either this file or
+.\" grep.c's 'usage' function results in a nontrivial change to the man page.
+.\" In Emacs, you can update the date by running 'M-x time-stamp'
+.\" after you make a change that you decide is nontrivial.
+.\" It is no big deal to forget to update the date.
+.
 .if !\n(.g \{\
 .	if !\w|\*(lq| \{\
 .		ds lq ``
@@ -1213,3 +1223,8 @@ This man page is maintained only fitfully;
 the full documentation is often more up-to-date.
 .\" Work around problems with some troff -man implementations.
 .br
+.
+.\" Format for Emacs-maintained Dt string defined at this file's start.
+.\" Local variables:
+.\" time-stamp-format: "%:y-%02m-%02d"
+.\" End:
-- 
2.7.4

Subject: grep.1: macro `Dt' not defined
From: "Santiago R.R." <[email-masked]>
To: [email-masked]
Date: Tue, 11 Jul 2017 15:41:17 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

As reported in https://bugs.debian.org/863437 line 23 (the .TH macro) in
grep.1 contains a not defined `Dt' macro.

Please, consider something like the attached patch to fix it.

Thanks,

Santiago
Index: grep/doc/Makefile.am
===================================================================
--- grep.orig/doc/Makefile.am
+++ grep/doc/Makefile.am
@@ -24,9 +24,12 @@ man_MANS = grep.1 fgrep.1 egrep.1
 EXTRA_DIST = grep.in.1
 CLEANFILES = grep.1 egrep.1 fgrep.1
 
+MAN_PAGE_UPDATED=$(shell $(top_srcdir)/build-aux/mdate-sh $(srcdir)/grep.in.1)
+
 grep.1: grep.in.1
 	$(AM_V_GEN)rm -f $@-t $@
-	$(AM_V_at)sed 's/@''VERSION@/$(VERSION)/' $(srcdir)/grep.in.1 > $@-t
+	$(AM_V_at)sed -e 's/@UPDATED@/$(MAN_PAGE_UPDATED)/' \
+		-e 's/@''VERSION@/$(VERSION)/' $(srcdir)/grep.in.1 > $@-t
 	$(AM_V_at)chmod a=r $@-t
 	$(AM_V_at)mv -f $@-t $@
 
Index: grep/doc/grep.in.1
===================================================================
--- grep.orig/doc/grep.in.1
+++ grep/doc/grep.in.1
@@ -20,7 +20,7 @@
 ..
 .\}
 .
-.TH GREP 1 \*(Dt "GNU grep @VERSION@" "User Commands"
+.TH GREP 1 "@UPDATED@" "GNU grep @VERSION@" "User Commands"
 .hy 0
 .
 .SH NAME