From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: adt2@speakeasy.org (A. Tsakiris) Newsgroups: gmane.emacs.help Subject: Re: inserting date and time at the cursor location Date: 13 Oct 2002 10:25:19 -0400 Organization: None Sender: help-gnu-emacs-admin@gnu.org Message-ID: References: <3d9aee7f$0$15412$3b214f66@aconews.univie.ac.at> <65wkkzdz.fsf@ID-23066.news.dfncis.de> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1034519492 13910 127.0.0.1 (13 Oct 2002 14:31:32 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 13 Oct 2002 14:31:32 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 180jmE-0003c5-00 for ; Sun, 13 Oct 2002 16:31:30 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 180jhO-0007WI-00; Sun, 13 Oct 2002 10:26:30 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp2.aus1.giganews.com!nntp.giganews.com!nntp3.aus1.giganews.com!News.GigaNews.Com.POSTED!not-for-mail Original-NNTP-Posting-Date: Sun, 13 Oct 2002 09:24:48 -0500 Original-Newsgroups: comp.emacs.xemacs,gnu.emacs.help,gnu.emacs.gnus User-Agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.6 Original-Lines: 18 Original-X-Trace: sv3-7YtoIGTZaQdoTtb7e4YZ/+TQYdKTkJqb2DM42a+Cq2apskHkkZcncPxfM9zIUZuejIkDEoiPf4N3b7T!kHVY83HH4CaiwBgk3o6w0PfQ5QDuZnKTMwgkBikQwjZ35m3lWEd7eHpvHNCqPO0vYDzXmoMbzQDy!Jw== Original-X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.1 Original-Xref: shelby.stanford.edu comp.emacs.xemacs:68293 gnu.emacs.help:106003 gnu.emacs.gnus:61188 Original-To: help-gnu-emacs@gnu.org Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:2549 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:2549 > (defun jh-insert-current-time () > (interactive) > (insert (current-time-string))) > > Then do `M-x jh-insert-current-time' or bind it to some key sequence. > ok, how do i bind this to a key? > Try (global-set-key (kbd "C-c d") 'jh-insert-current-date) in your .emacs file. This will bind the function to the key sequence C-c d. -- A. Tsakiris