I am writing a simple keyboard macro to insert a comment with my name and a short timestamp. Is there an easy way to get a timestamp? Ideally I would be able to define it in my macro so that it uses a relatively short form like YY-MM-DD HH:MM.
I'd like it to be as common to emacs as possible, so I'd rather not resort to Org mode or other add-ons that might not be part of a standard installation. Here's basically what I have so far, what I need is what's between the angle braces:
(fset 'my-timestamp "[myname <YY-MM-DD HH:MM>]: ") (global-set-key (kbd "C-c #") 'my-timestamp)