From mboxrd@z Thu Jan 1 00:00:00 1970 From: Markus Heller Subject: Re: Emacs/Org-mode question Date: Fri, 31 Jul 2009 15:08:16 -0700 Message-ID: References: <4A736607.6060704@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MX0HE-0002zH-Lz for emacs-orgmode@gnu.org; Fri, 31 Jul 2009 18:08:36 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MX0HA-0002tp-6t for emacs-orgmode@gnu.org; Fri, 31 Jul 2009 18:08:36 -0400 Received: from [199.232.76.173] (port=40508 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MX0HA-0002tm-4D for emacs-orgmode@gnu.org; Fri, 31 Jul 2009 18:08:32 -0400 Received: from main.gmane.org ([80.91.229.2]:57638 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MX0H9-0007EE-D5 for emacs-orgmode@gnu.org; Fri, 31 Jul 2009 18:08:31 -0400 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1MX0H6-0006NW-Rj for emacs-orgmode@gnu.org; Fri, 31 Jul 2009 22:08:28 +0000 Received: from 142.103.191.98 ([142.103.191.98]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 31 Jul 2009 22:08:28 +0000 Received: from hellerm2 by 142.103.191.98 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 31 Jul 2009 22:08:28 +0000 In-Reply-To: <4A736607.6060704@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Brian van den Broek wrote: > Markus Heller said unto the world at 31/07/09 05:39 PM: >> Hello all, >> >> this might be a typical beginner question ... >> >> I often use the sequence >> >> C-. C-- : >> >> to create this: >> >> - <2009-07-31 Fri>: >> >> where the date is today's date. >> >> I'm sure there's a way to create a command for this, but I have no >> idea how. I'd like to bind this sequence to something like C-c t or >> similar. >> >> How do I do this? >> >> Thanks and Cheers >> Markus > > Hi Markus, > > I have the following in my .emacs: > > (defun date () > (interactive "*") > (insert (format-time-string "%Y-%m-%d %T" (current-time)))) > (global-set-key [f11] 'date) > > This will at least get you started. See the documentation for > format-time-string to season as suits. > > Best, > > Brian vdB > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > Thanks Brian, this got me started. The code in my .emacs looks like this for me now: (defun org-date () (interactive "*") (insert (format-time-string "- <%Y-%m-%d %a>: "))) (global-set-key (kbd "C-c d") 'org-date) Cheerio M