From: "B. T. Raven" <nihil@nihilo.net>
To: help-gnu-emacs@gnu.org
Subject: Re: Inserting a timestamp in a file
Date: Fri, 30 Jan 2009 23:15:10 -0600 [thread overview]
Message-ID: <GvCdnapxCYXGQx7UnZ2dnUVZ_g2dnZ2d@sysmatrix.net> (raw)
In-Reply-To: <mailman.6165.1233240186.26697.help-gnu-emacs@gnu.org>
Fred Picher wrote:
> Hello,
>
> Is there a way to insert a timestamp at a precise place in a file, eg. is there a function that does this ?
>
> Thanks.
>
This has to go in one of the first eight lines of the file
;; Time-stamp: ""
then this (or equivalent code) in your .emacs:
(add-hook 'write-file-hooks 'time-stamp)
I suppose you could copy it programatically anywhere else in the file if
you needed to, say at a bookmark. That would have to be done again
everytime you saved. What's the usefulness of putting the time stamp at
an arbitrary place? A save saves the whole file.
Ed
next prev parent reply other threads:[~2009-01-31 5:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.6165.1233240186.26697.help-gnu-emacs@gnu.org>
2009-01-29 16:59 ` Inserting a timestamp in a file Maarten Bergvelt
2009-01-30 11:26 ` Kiwon Um
2009-01-31 5:15 ` B. T. Raven [this message]
2009-01-29 14:25 Fred Picher
2009-01-29 16:59 ` Drew Adams
2009-01-31 16:30 ` Harry Putnam
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=GvCdnapxCYXGQx7UnZ2dnUVZ_g2dnZ2d@sysmatrix.net \
--to=nihil@nihilo.net \
--cc=help-gnu-emacs@gnu.org \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.