[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [groff] mom date string
From: |
Greg 'groggy' Lehey |
Subject: |
Re: [groff] mom date string |
Date: |
Tue, 9 Jul 2019 15:29:28 +1000 |
User-agent: |
Mutt/1.6.1 (2016-04-27) |
On Tuesday, 9 July 2019 at 4:30:56 +0200, Ingo Schwarze wrote:
> Hi Kirill,
>
> Kirill S Sapelkin wrote on Mon, Jul 08, 2019 at 07:19:17PM -0700:
>
>> Just started using groff and mom (had been using LaTeX) for letters so far.
>> So far it seems elegant.
>>
>> Could not find a way to automaticaly insert the date at compile time
>> other than:
>>
>> .DATE
>> .sy date '+%e %B %Y' > dater
>> .so dater
>> .sy rm dater
>>
>> Is there anything like this in mom?
>
> I don't know about mom, but consider whether you really want to do
> this. I always found it extremely annoying when finding a directory
> of letters somewhere and they all had dates automatically inserted
> at compile time, so there was no way of finding the date that was in
> the letters when they were actually sent. You can't always rely on
> the "last changed" date of the file itself: files often get copied
> around later.
I keep my files under RCS, and I've found that the RCS version is a
more reliable metric. The macro is trivial:
.\" Extract version number from RCS Id string.
.de Id
Version \\f(CW\\$3\\fP
..
You could easily modify that to provide the date (in the simplest
form, $4 and $5) of something like
Id: vinum.mm,v 4.20 2003/06/29 04:33:42 grog Exp grog $
And of course this should extend to other versioning systems.
Greg
--
Sent from my desktop computer.
Finger address@hidden for PGP public key.
See complete headers for address and phone numbers.
This message is digitally signed. If your Microsoft mail program
reports problems, please read http://lemis.com/broken-MUA
signature.asc
Description: PGP signature