Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!ll-xn!mit-eddie!bbn!gateway!symbol.UUCP!cdr From: cdr@symbol.UUCP (Constantine Rasmussen - Sun ECD) Newsgroups: comp.emacs Subject: Re: insert time/date and signature Message-ID: <8809081924.AA09732@symbol.sunecd.com> Date: 8 Sep 88 19:24:18 GMT References: <7373@umn-cs.cs.umn.edu> Sender: news@bbn.COM Organization: BBN news/mail gateway Lines: 19 I use this for my insert date function. It's in a file that gets loaded from my .emacs. ======================================================= ;;; date function (useful for logging times in job notes, etc ...) (defun insert-date-and-time (&optional use-long-form) "Args: (&OPTIONAL USE-LONG-FORM) Returns value from call-process. Insert the current date and time at point. Use of a prefix argument will invoke long form, ie, \"Tue, Jul 12, 1988, 02:17:44 PM\". Always ends with a newline." (interactive "P") (call-process "date" nil t nil (if use-long-form "+%a, %h %d, 19%y, %r" "+%D, %H:%M"))) (global-set-key "t" 'insert-date-and-time)