From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.help Subject: Re: insert date/time Date: Wed, 30 Mar 2005 09:09:39 +0900 Message-ID: <87hdiuq9j0.fsf@tc-1-100.kawasaki.gol.ne.jp> References: Reply-To: Miles Bader NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1112141974 12699 80.91.229.2 (30 Mar 2005 00:19:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 30 Mar 2005 00:19:34 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Mar 30 02:19:28 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DGQvG-0002e5-76 for geh-help-gnu-emacs@m.gmane.org; Wed, 30 Mar 2005 02:19:02 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DGRBd-0006AL-Q8 for geh-help-gnu-emacs@m.gmane.org; Tue, 29 Mar 2005 19:35:58 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DGR3M-0002Pu-Mv for help-gnu-emacs@gnu.org; Tue, 29 Mar 2005 19:27:24 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DGR3I-0002Nk-Gl for help-gnu-emacs@gnu.org; Tue, 29 Mar 2005 19:27:22 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DGR3I-0002Ml-2f for help-gnu-emacs@gnu.org; Tue, 29 Mar 2005 19:27:20 -0500 Original-Received: from [203.216.5.72] (helo=smtp02.dentaku.gol.com) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1DGQmG-0003rV-4t; Tue, 29 Mar 2005 19:09:44 -0500 Original-Received: from localhost ([127.0.0.1]) by smtp02.dentaku.gol.com with esmtp (Dentaku) id 1DGQmE-0004JF-2Q; Wed, 30 Mar 2005 09:09:42 +0900 Original-Received: from yokohama2-61-203-152-216.ap.0038.net ([61.203.152.216] helo=tc-1-100.kawasaki.gol.ne.jp) by smtp02.dentaku.gol.com with esmtpa (Dentaku) id 1DGQmD-0004J7-A4; Wed, 30 Mar 2005 09:09:41 +0900 Original-Received: by tc-1-100.kawasaki.gol.ne.jp (Postfix, from userid 1000) id A32592F68; Wed, 30 Mar 2005 09:09:39 +0900 (JST) Original-To: help-gnu-emacs@gnu.org System-Type: i686-pc-linux-gnu In-Reply-To: (gooliver's message of "Tue, 29 Mar 2005 22:12:25 GMT") Original-Lines: 30 X-Virus-Scanned: by AMaViS GOL X-Abuse-Complaints: abuse@gol.com X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:25288 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:25288 gooliver writes: > I have emacs 21.3 for windows. How to insert actual date/time > in this format: > > XX XXXX, - h.XX:XX You could define an elisp function, like: (defun insert-wacky-time () (interactive) (insert (format-time-string "%d %B %Y, %A - h.%02H:%02M"))) And then bind it to a key, or call it using M-x. See the documentation for `format-time-string' as to the details of the various escape sequences. BTW that will use the current locale's names for day/month; if you want it to always use "standard" names, you should force format-time-string to use the "C" locale, by binding `system-time-locale': (defun insert-wacky-time () (interactive) (let ((system-time-locale "C")) (insert (format-time-string "%d %B %Y, %A - h.%02H:%02M")))) -Miles -- Is it true that nothing can be known? If so how do we know this? -Woody Allen