[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: inserting date and time at the cursor location
From: |
kgold |
Subject: |
Re: inserting date and time at the cursor location |
Date: |
2 Oct 2002 15:45:17 GMT |
I don't know about xemacs, but here's the function I use in emacs:
(defun insert-date ()
"Insert date at the current cursor position in the current buffer."
(interactive)
(insert (format-time-string "%d %B %Y ")))
Bonus 1:
I bind it to a key like this:
(define-key esc-map "D" 'insert-date)
Bonus 2:
If you want a time stamp updated automatically every time you write:
; time stamp (Time-stamp: " " in first eight lines of file)
(add-hook 'write-file-hooks 'time-stamp)
(setq time-stamp-active t)
(setq time-stamp-format "%02d %:b %:y %02H:%02M:%02S")
"Guy-Armand Kamendje" <kguy@gmx.at> writes:
>
> Is there a way to let xemacs insert the current date and time at the actual
> cursor location?
--
--
Ken Goldman kgold@watson.ibm.com 914-784-7646
- 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 <=
- Re: inserting date and time at the cursor location, ken, 2002/10/04