help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: automatic time-stamp


From: Holger Sparr
Subject: Re: automatic time-stamp
Date: Wed, 04 May 2005 08:50:32 +0200
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (gnu/linux)

On Tue, 03 May 2005, Jeffrey L. Greer wrote:
> 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.
> 

,----[ C-h f time-stamp RET ]
| time-stamp is an interactive compiled Lisp function in `time-stamp'.
| (time-stamp)
| 
| 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.
`----

Put a line containing: 

       "Time-stamp: <>"

in one of the first 8 lines of the file you want to time stamp.

With 

(add-hook 'write-file-hooks 'time-stamp) 

in your .emacs the above string gets updated when the file is being
saved.


-- 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]