help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Insert date and Time


From: Pascal J. Bourguignon
Subject: Re: Insert date and Time
Date: Thu, 25 Feb 2010 15:50:34 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (darwin)

Tugello <kompy01@yahoo.it> writes:

> Hello, 
> good morning to all,I'm newbie with emacs
> my question is about how to insert current date and time, using a short key
> combination instead to write they completely .
> someone ave any suggestion ?
> thanks in advance 

I type: C-u M-! date RET

A purely emacs lisp alternative would be: 
M-: (insert (current-time-string)) RET


Of course, if you have to do it often, you can do:

(defun insert-timestamp ()
  (interactive)
  (insert (current-time-string)))

(global-set-key (kbd "<f8>") 'insert-timestamp)

so that you only have to type F8 to insert the timestamp.

-- 
__Pascal Bourguignon__


reply via email to

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