Tuesday, February 18, 2003

Adding a timestamp

Found the following snippet of code on www.bjclark.com/code/my.emacs.html, to insert a timestamp string at the current point. Wonderful things, Google and Emacs. (Although I'm surprised that something this simple wasn't a stock part of Emacs...).


(defun insert-date ()
"Insert current date and time."
(interactive "*")
(insert (current-time-string)))


No comments: