Having Emacs time-stamps at the end of files
Do you ever use Emacs time stamp functionality (type C-h
f time-stamp in Emacs to learn about that) to insert the
current date time stamp into your file when you save it? I use this
frequently in documents I write, for my blog or standalone. For the
longest time I thought you had to have the time stamp at the beginning
of the file. But I wanted it at the end of blog posts because it’s
really an afterthought to most readers. (Sometimes I go back and edit
posts some time after first posting them — perhaps they were
incomplete, or they had errors that needed correcting, etc.) It turns
out that you can do that — if you set the variable
time-stamp-line-limit
to a negative number it will look
backwards from the end of the file for the timestamp. I often set the
time stamp variables in a Local Variables:
comment at the end of
the file.
Here's the reST fragment I insert into my blog posts that uses
time-stamp
:
Comments
Comments powered by Disqus