* Re: Inserting date [not found] <mailman.2121.1235875820.31690.help-gnu-emacs@gnu.org> @ 2009-03-01 3:38 ` B. T. Raven 2009-03-01 6:18 ` Drew Adams 2009-03-02 20:17 ` Ken Goldman 1 sibling, 1 reply; 4+ messages in thread From: B. T. Raven @ 2009-03-01 3:38 UTC (permalink / raw) To: help-gnu-emacs 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: Inserting date 2009-03-01 3:38 ` Inserting date B. T. Raven @ 2009-03-01 6:18 ` Drew Adams 0 siblings, 0 replies; 4+ messages in thread From: Drew Adams @ 2009-03-01 6:18 UTC (permalink / raw) To: help-gnu-emacs > > 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Inserting date [not found] <mailman.2121.1235875820.31690.help-gnu-emacs@gnu.org> 2009-03-01 3:38 ` Inserting date B. T. Raven @ 2009-03-02 20:17 ` Ken Goldman 1 sibling, 0 replies; 4+ messages in thread From: Ken Goldman @ 2009-03-02 20:17 UTC (permalink / raw) To: help-gnu-emacs If you want to insert the current date, how about M-x insert-date? If you want to insert, e.g., a time stamp for the last time a file was written, look at the 'time-stamp' features. Armando Martins wrote: > > Can you tell me how can I insert the today's date in a text file, > please? (something like fields in traditional word processors). ^ permalink raw reply [flat|nested] 4+ messages in thread
* Inserting date @ 2009-03-01 2:50 Armando Martins 0 siblings, 0 replies; 4+ messages in thread From: Armando Martins @ 2009-03-01 2:50 UTC (permalink / raw) To: help-gnu-emacs 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-03-02 20:17 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <mailman.2121.1235875820.31690.help-gnu-emacs@gnu.org> 2009-03-01 3:38 ` Inserting date B. T. Raven 2009-03-01 6:18 ` Drew Adams 2009-03-02 20:17 ` Ken Goldman 2009-03-01 2:50 Armando Martins
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).