gooliver <[EMAIL PROTECTED]> writes:
> I have emacs 21.3 for windows. How to insert actual date/time
> in this format:
>
> XX <Month> XXXX, <Day> - h.XX:XX

You could define an elisp function, like:

   (defun insert-wacky-time ()
     (interactive)
     (insert
      (format-time-string "%d %B %Y, %A - h.%02H:%02M")))

And then bind it to a key, or call it using M-x.  See the documentation
for `format-time-string' as to the details of the various escape
sequences.

BTW that will use the current locale's names for day/month; if you want
it to always use "standard" names, you should force format-time-string
to use the "C" locale, by binding `system-time-locale':

   (defun insert-wacky-time ()
     (interactive)
     (let ((system-time-locale "C"))
       (insert
        (format-time-string "%d %B %Y, %A - h.%02H:%02M"))))

-Miles
-- 
Is it true that nothing can be known?  If so how do we know this?  -Woody Allen


_______________________________________________
Help-gnu-emacs mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

Reply via email to