[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: automatic time-stamp
From: |
Tim X |
Subject: |
Re: automatic time-stamp |
Date: |
Wed, 04 May 2005 18:19:06 +1000 |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) |
"Jeffrey L. Greer" <jlgreer1@excite.com> writes:
> I am trying to configure automatic time-stamp for emacs 21 in a Debian
> Sarge system. I have the following .emacs file in my home directory. I
> have read and re-read what seems to be the relevant pages in the hard
> copy of Gnu Emacs Manual. Time stamp will only work manually.
>
> Suggestions please? Thank you, Jeff Greer
I use the time-stamp command to insert a created time and last
modified time via a 'tempo' skeleton template I have. This works really well -
when I insert the skeleton I get this
> Filename: /home/tcross/News/drafts/drafts/2
> Creation Date: Wednesday, 04 May 2005 06:13 PM EST
> Last Modified:
> Job:
> Author: Tim Cross <tcross@pobox.une.edu.au>
> Description:
>
The Last Modified field is updated each time I save the file. The
relevant time-stamp stuff from my .emacs is
(add-hook 'write-file-hooks 'time-stamp)
(setq time-stamp-active t)
(setq time-stamp-format "%:a, %02d %:b %:y %02I:%02M %#P %Z")
(setq time-stamp-start "\\(Time-stamp:[ ]+\\\\?[\"<]+\\|Last Modified:[
]\\)")
(setq time-stamp-end "\\\\?[\">]\\|$")
(setq time-stamp-line-limit 10)
The template is
(tempo-define-template "generic-header"
'((format "%s" comment-start)
" Filename: "
(buffer-file-name) '> 'n
(format "%s" comment-start) "
Creation Date: "
(format-time-string "%A, %d %B
%Y %I:%M %p %Z") '> 'n
(format "%s" comment-start) "
Last Modified: " '> 'n
(format "%s" comment-start)
" Job: " (p "Job: ")
'> 'n
(format "%s" comment-start)
" Author: Tim Cross
<tcross@pobox.une.edu.au>"
'> 'n
(format "%s" comment-start) "
Description:" '> 'n
(format "%s" comment-start) '>
'n
'n))
HTH
Tim
--
Tim Cross
The e-mail address on this message is FALSE (obviously!). My real e-mail is
to a company in Australia called rapttech and my login is tcross - if you
really need to send mail, you should be able to work it out!