From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim X Newsgroups: gmane.emacs.help Subject: Re: automatic time-stamp Date: Wed, 04 May 2005 18:19:06 +1000 Message-ID: <87sm13xv2d.fsf@tiger.rapttech.com.au> References: Reply-To: timx@spamto.devnul.com NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1115241807 15485 80.91.229.2 (4 May 2005 21:23:27 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 4 May 2005 21:23:27 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed May 04 23:23:25 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DTRKD-0007fV-0j for geh-help-gnu-emacs@m.gmane.org; Wed, 04 May 2005 23:22:33 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DTRRZ-0003Sn-IE for geh-help-gnu-emacs@m.gmane.org; Wed, 04 May 2005 17:30:09 -0400 Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:uHX5Qukc3/jNKtrNPouvinnJbmM= Original-NNTP-Posting-Host: ppp27-228.lns1.syd2.internode.on.net Original-X-Trace: duster.adelaide.on.net 1115194747 59.167.27.228 (4 May 2005 17:49:07 +0950) Original-Lines: 58 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news3.google.com!news.glorb.com!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.usenet.com!news.moat.net!quokka.wn.com.au!news.adelaide.pipenetworks.com!duster.adelaide.on.net!not-for-mail Original-Xref: shelby.stanford.edu gnu.emacs.help:130647 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:26299 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:26299 "Jeffrey L. Greer" 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 > 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 " '> '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!