From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: Inserting date Date: Sat, 28 Feb 2009 22:18:15 -0800 Message-ID: <002301c99a35$81f12ae0$0200a8c0@us.oracle.com> References: <2N6dnfxCVbmGnjfUnZ2dnUVZ_sDinZ2d@sysmatrix.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1235888337 24258 80.91.229.12 (1 Mar 2009 06:18:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 1 Mar 2009 06:18:57 +0000 (UTC) To: Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Mar 01 07:20:13 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Ldf22-00053Y-F5 for geh-help-gnu-emacs@m.gmane.org; Sun, 01 Mar 2009 07:20:10 +0100 Original-Received: from localhost ([127.0.0.1]:51159 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ldf0g-0003mO-W3 for geh-help-gnu-emacs@m.gmane.org; Sun, 01 Mar 2009 01:18:47 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ldf04-0003jC-2t for help-gnu-emacs@gnu.org; Sun, 01 Mar 2009 01:18:08 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ldf01-0003g7-8j for help-gnu-emacs@gnu.org; Sun, 01 Mar 2009 01:18:06 -0500 Original-Received: from [199.232.76.173] (port=53570 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ldf00-0003fZ-SE for help-gnu-emacs@gnu.org; Sun, 01 Mar 2009 01:18:04 -0500 Original-Received: from acsinet11.oracle.com ([141.146.126.233]:16934) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Ldf00-0001Pa-Cf for help-gnu-emacs@gnu.org; Sun, 01 Mar 2009 01:18:04 -0500 Original-Received: from rgminet15.oracle.com (rcsinet15.oracle.com [148.87.113.117]) by acsinet11.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n216ITcg009620 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 1 Mar 2009 06:18:31 GMT Original-Received: from acsmt705.oracle.com (acsmt705.oracle.com [141.146.40.83]) by rgminet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n216Hw9L011688 for ; Sun, 1 Mar 2009 06:17:59 GMT Original-Received: from dradamslap1 (/141.144.72.79) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 28 Feb 2009 22:17:55 -0800 X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcmaH5rijVSXMdT5SDmpZOlNIxoFGwAFaJ2w In-Reply-To: <2N6dnfxCVbmGnjfUnZ2dnUVZ_sDinZ2d@sysmatrix.net> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 X-Source-IP: acsmt705.oracle.com [141.146.40.83] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090209.49AA2895.0064:SCFSTAT928724,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) 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:62488 Archived-At: > > Can you tell me how can I insert the today's date in a text file, > > please? (something like fields in traditional word processors). > > (global-set-key "\C-cid" (lambda() (interactive) (insert > (format-time-string "%a %Y-%m-%d - %l:%M %p")))) > > then you can use that key combo to insert day date - time. Strip out > some of the formating specs if you don't need them or change > their order if you like. These might help too (just some Emacs wiki search results for "insert date"): http://www.emacswiki.org/emacs/InsertingTodaysDate http://www.emacswiki.org/emacs/InsertAnyDate http://www.emacswiki.org/emacs/InsertDate