[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Update time stamps of different kind
From: |
Peter Dyballa |
Subject: |
Re: Update time stamps of different kind |
Date: |
Thu, 16 Jul 2009 01:49:07 +0200 |
Am 15.07.2009 um 19:44 schrieb Uwe Siart:
,----
| <!-- Time-stamp: "2009-07-08 09:19:15 siart" -->
| <meta name="DC.date" content="2009-07-08" />
`----
I found kind of a work-around, which does not work correctly! Maybe
it gives you some hints…
I changed the two-liner to:
<meta name="DC.date" content="2009-07-15" /> <!-- "2009-07-13
00:10:18 dunno" -->
and the file's tail to:
</body>
<!-- Local Variables: -->
<!-- eval: (add-hook 'write-file-hooks 'time-stamp) -->
<!-- eval: (add-hook 'write-file-hooks 'delete-trailing-whitespace) -->
<!-- mode: html-helper -->
<!-- fill-column: 99999 -->
<!-- time-stamp-start: " <meta name=\"DC.date\" content=\"" -->
<!-- time-stamp-format: "%:y-%02m-%02d\" /> <!-- \"%:y-%02m-%02d %
02H:%02M:%02S %u" -->
<!-- End: -->
</html>
If time-stamp is not in global write-file-hooks it's added here
locally. Also the function delete-trailing-whitespace is added (which
is not safe by default, you'll need to declare it as save by typing
``!´´ when you're prompted). The mode line is not that meaningful,
that with fill-column neither, just examples. The local variable time-
stamp-start overrides the default "Timestamp" value. Here part of the
standard header is defined as local substitute. Next comes the real
time-stamp-format. Maybe it's possible to insert a newline there…
A final setting of time-stamp-end is also possible.
The HTML test file with these additions loads OK in GNU Emacs and
displays OK in an HTML browser. When I save the file *Messages* shows:
Saving file ....silly.html...
timestamp delimiter start was not found
and the header now is something like this:
<meta name="DC.date" content="2009-07-16" /> <!-- "2009-07-16
01:38:56 pete" /> <!-- "2009-07-16 01:38:56 pete" /> <!--
"2009-07-13 00:10:18 dunno" -->
So repetition due to some malfunction/error exists! The `` -->´´ in
the footer are not wrong or too much, they're needed. Maybe a block
comment for the local variables section is better.
--
Mit friedvollen Grüßen
Pete
Specifications are for the weak and timid!