From: Tim X <timx@spamto.devnul.com>
Subject: Re: automatic time-stamp
Date: Wed, 04 May 2005 18:19:06 +1000 [thread overview]
Message-ID: <87sm13xv2d.fsf@tiger.rapttech.com.au> (raw)
In-Reply-To: w6Ude.26842$r81.5612@trnddc02
"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!
next prev parent reply other threads:[~2005-05-04 8:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-03 23:49 automatic time-stamp Jeffrey L. Greer
2005-05-04 6:46 ` Peter Tury
2005-05-04 6:50 ` Holger Sparr
2005-05-04 8:19 ` Tim X [this message]
2005-05-04 10:48 ` Jeffrey L. Greer
2005-05-04 20:58 ` Peter Dyballa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sm13xv2d.fsf@tiger.rapttech.com.au \
--to=timx@spamto.devnul.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).