[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.
hth,
ken
--
AMD crashes? See http://cleveland.lug.net/~ken/amd-problem/.
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
= Help-gnu-emacs@gnu.org
= http://mail.gnu.org/mailman/listinfo/help-gnu-emacs
=
- inserting date and time at the cursor location, Guy-Armand Kamendje, 2002/10/02
- Re: inserting date and time at the cursor location, Jesper Harder, 2002/10/02
- Re: inserting date and time at the cursor location, David Kastrup, 2002/10/02
- Re: inserting date and time at the cursor location, Clemens Fischer, 2002/10/02
- Re: inserting date and time at the cursor location, ftrw, 2002/10/03
- Re: inserting date and time at the cursor location, Reiner Steib, 2002/10/03
- Re: inserting date and time at the cursor location, Mario Lang, 2002/10/11
- Re: inserting date and time at the cursor location, A. Tsakiris, 2002/10/13
- Re: inserting date and time at the cursor location, kgold, 2002/10/02
- Re: inserting date and time at the cursor location,
ken <=