From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: ftrw@uaf.edu Newsgroups: gmane.emacs.help Subject: Re: inserting date and time at the cursor location Date: 02 Oct 2002 20:13:57 -0800 Organization: University of Alaska 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 1033712175 31630 127.0.0.1 (4 Oct 2002 06:16:15 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 4 Oct 2002 06:16:15 +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 17xLkz-0008Dx-00 for ; Fri, 04 Oct 2002 08:16:13 +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 17xLgu-0001I7-00; Fri, 04 Oct 2002 02:12:00 -0400 Original-Path: shelby.stanford.edu!nntp.stanford.edu!newsfeed.stanford.edu!canoe.uoregon.edu!hammer.uoregon.edu!news.alaska.edu!not-for-mail Original-Newsgroups: comp.emacs.xemacs,gnu.emacs.help,gnu.emacs.gnus Original-Followup-To: gnu.emacs.help Original-Lines: 23 Original-NNTP-Posting-Host: ramona.phys.uaf.edu Original-X-Trace: news.alaska.edu 1033617928 29394 137.229.53.149 (3 Oct 2002 04:05:28 GMT) Original-X-Complaints-To: abuse@alaska.edu Original-NNTP-Posting-Date: Thu, 3 Oct 2002 04:05:28 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Original-Xref: nntp.stanford.edu comp.emacs.xemacs:68192 gnu.emacs.help:105659 gnu.emacs.gnus:60968 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:2227 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:2227 Clemens Fischer writes: > David Kastrup writes: > > > You could also use > > C-u M-! date RET > > ok, how do i bind this to a key? > > clemens C-x ( (define macro) C-u M-! date RET (your macro) C-x ) (end macro) M-x name-last-kbd-macro RET insert-date (name macro) C-x C-f ~/.emacs M-x insert-kbd-macro RET insert-date (insert macro into .emacs) Now add this line underneath your new macro (choose whatever key you want to bind it to): (global-set-key [M-f4] 'insert-date)