From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Peter Tury" Newsgroups: gmane.emacs.help Subject: Re: automatic time-stamp Date: Wed, 04 May 2005 06:46:39 GMT Organization: MSG Message-ID: References: Reply-To: Peter Tury NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1115241690 12535 80.91.229.2 (4 May 2005 21:21:30 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 4 May 2005 21:21:30 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed May 04 23:21:27 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DTRIY-0007SB-G2 for geh-help-gnu-emacs@m.gmane.org; Wed, 04 May 2005 23:20:51 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DTRPw-0002XN-4E for geh-help-gnu-emacs@m.gmane.org; Wed, 04 May 2005 17:28:28 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!fi.sn.net!newsfeed2.fi.sn.net!feeder2.news.jippii.net!feeder1.news.jippii.net!nntp.inet.fi!inet.fi!newsfeed1.nokia.com!news1.nokia.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 52 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Original-NNTP-Posting-Host: 172.24.170.141 Original-X-Complaints-To: newsmaster@nokia.com Original-X-Trace: news1.nokia.com 1115189199 172.24.170.141 (Wed, 04 May 2005 09:46:39 EET DST) Original-NNTP-Posting-Date: Wed, 04 May 2005 09:46:39 EET DST Original-Xref: shelby.stanford.edu gnu.emacs.help:130645 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:26297 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:26297 "Jeffrey L. Greer" wrote in message news:w6Ude.26842$r81.5612@trnddc02... > 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 > > (custom-set-variables > ;; custom-set-variables was added by Custom -- don't edit or cut/paste it! > ;; Your init file should contain only one such instance. > '(add-hook (quote write-file-hooks) t) > '(case-fold-search t) > '(column-number-mode t) > '(current-language-environment "English") > '(global-font-lock-mode t nil (font-lock)) > '(time-stamp-active t)) Hi, I don't know whether this will help you, but the on-line help (C-h a time-stamp) writes this: time-stamp is an interactive autoloaded Lisp function in `time-stamp'. [Arg list not available until function definition is loaded.] Update the time stamp string(s) in the buffer. A template in a file can be automatically updated with a new time stamp every time you save the file. Add this line to your .emacs file: (add-hook 'write-file-hooks 'time-stamp) Normally the template must appear in the first 8 lines of a file and look like one of the following: Time-stamp: <> Time-stamp: " " The time stamp is written between the brackets or quotes: Time-stamp: <1998-02-18 10:20:51 gildea> The time stamp is updated only if the variable `time-stamp-active' is non-nil. The format of the time stamp is set by the variable `time-stamp-format'. The variables `time-stamp-line-limit', `time-stamp-start', `time-stamp-end', `time-stamp-count', and `time-stamp-inserts-lines' control finding the template. So I think (add-hook 'write-file-hooks 'time-stamp) should be added to your .emacs (+ the appropriate templates to your files?). Br, P