[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: inserting date and time at the cursor location

From: ken
Subject: Re: inserting date and time at the cursor location
Date: Fri, 4 Oct 2002 00:46:41 -0400 (EDT)

Here's some elisp which does them separately... what I use:

(defun now ()
  "Insert string for the current time formatted like '2:34 PM'."
  (interactive)                 ; permit invocation in minibuffer
  (insert (format-time-string "%-I:%M %p"))

(defun today ()
  "Insert string for today's date nicely formatted in American style,
e.g. Sunday, September 17, 2000."
  (interactive)                 ; permit invocation in minibuffer
  (insert (format-time-string "%A, %B %e, %Y"))

Put these in a file in your emacs path.  Do "M-x today" or "M-x now" to 
invoke.  Also, it should be obvious how to integrate the two.


AMD crashes?  See

Spake Guy-Armand Kamendje at 15:03 (UTC+0200) on Wed, 2 Oct 2002:

= Hi,
= Is there a way to let xemacs insert the current date and time at the actual
= cursor location?
= Thanks for any hint
= Guy
= _______________________________________________
= Help-gnu-emacs mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]