From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "B. T. Raven" Newsgroups: gmane.emacs.help Subject: Re: Inserting date Date: Sat, 28 Feb 2009 21:38:10 -0600 Message-ID: <2N6dnfxCVbmGnjfUnZ2dnUVZ_sDinZ2d@sysmatrix.net> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1235878875 8871 80.91.229.12 (1 Mar 2009 03:41:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 1 Mar 2009 03:41:15 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Mar 01 04:42:31 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 1LdcZL-00005C-JR for geh-help-gnu-emacs@m.gmane.org; Sun, 01 Mar 2009 04:42:23 +0100 Original-Received: from localhost ([127.0.0.1]:33570 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LdcY0-0000Vk-Ei for geh-help-gnu-emacs@m.gmane.org; Sat, 28 Feb 2009 22:41:00 -0500 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news1.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.sysmatrix.net!news.sysmatrix.net.POSTED!not-for-mail Original-NNTP-Posting-Date: Sat, 28 Feb 2009 21:38:03 -0600 User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) Original-Newsgroups: gnu.emacs.help In-Reply-To: Original-Lines: 21 X-Usenet-Provider: http://www.giganews.com Original-NNTP-Posting-Host: 12.73.129.27 Original-X-Trace: sv3-yN7qARA3I0OuJq+rPLnmZjB9zssEDvUGY0Wsu9o4d/5eUUj8fG2IJPzqfuZHk7d8RQZ30fzA3Sw7HTe!8tmc7f+pCMX4hzmNjjiW3T+fOWhFeamWPX4vnrHcdoxYmQbErkvwssIEYU8uw9lIrPAq/FoFmeoE!9l341ohc2Tu18oj5pKZMRQlnU9pCLA== Original-X-Complaints-To: abuse@sysmatrix.net 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.3.39 Original-Xref: news.stanford.edu gnu.emacs.help:167186 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:62487 Archived-At: Armando Martins wrote: > Hello! > > Can you tell me how can I insert the today's date in a text file, > please? (something like fields in traditional word processors). > > Thanks > Armando Martins > > If you evaluate this: (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. Ed